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.
Whenever we write a servlet, we inherit our class from HttpServlet which contains two service methods. Let’s have a look at the difference between both.
This article assumes that you have a basic knowledge of method overriding and overloading.
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.
Java Generics is a simple and great feature of the java technology. I have been asked about it in many job interviews and professional gatherings. In fact, I also ask about Java Generics when chatting with a java newbie or a professional and guess what ? Even the professionals sometimes don’t know what exactly java generics is; though they have used it extensively in their projects.
I have been working on various projects in which I used hibernate in many projects. However, when in an interview, I was asked about why one should choose hibernate, I thought I should put together the benefits and the reasons to choose Hibernate.