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-58d40f33062ea678229135/] Here we have defined two variables s1 and s2 and both of them carries same value java. Ok, lets try to find…continue reading →