Deadlocks in Java is one of the tough categories in which interview questions are asked about multithreading, asked more at a senior level and with lots of follow up questions, though question looks very basic but most of developer get stuck once you start going deep.
The question might start with “What is deadlock ?”
An Object relational mapping (ORM), as shown from the name, is used to map the objects to a relational database. Now, to clarify, by relational database we mean a database with relations(tables) and mapping an object means doing the necessary configuration so that we can automatically save the object as a whole(in the db).
If you haven’t read the Cup Size story, this one won’t make sense. Or it will make sense, but you’ll think its really stupid. Or you won’t think it’s stupid but you’ll find yourself… never mind, just go read it now and then come back.
This is one of the mostly asked question in job interviews or other professional gatherings.
Most of the candidates are able to tell the difference but they get stuck in the second part, WHEN TO USE WHICH ?
java.lang.Object class defined like
public native int hashCode(); // without any body
Now, in spite of having two years of hands on experience in java and related technologies, I didn’t know that it is a native method. This made me dig deeper and explore the native interface API provided by java.