Difference between ==  and equals()

Difference between == and equals()

Difference between equals() and == is another famous interview question like Why String is final in Java. Lets check what is the difference by writing some code. [crayon-58b564da4b1ae522120613/] Here we have defined two variables s1 and s2 and both of them carries same value java. Ok, lets try to find…continue reading →
Why String is final in Java

Why String is final in Java

Why String is final in Java? This is a very famous interview question in java commonly asked to mid/junior level developers. The interviewer may not only tries to get into your knowledge about String class, but he is also trying to test your knowledge about immutability of objects, behavior of…continue reading →
  • 1
  • 2