Tag: Interview Question
-
What is difference between == and equals() in Java?
Normally in almost every second Java-J2EE interview, interviewers ask this question. This question confuses a lot of Java programmers. In one line you can answer this question. == compares the reference value of string object whereas equals() method is present in the java.lang.Object class. This method compares content of the string object. The equals() method…