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.