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 ?”
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 ?