Comment on Tutorial - equals( ) Versus == in Java By Mashoud
Comment Added by : Gunjan
Comment Added at : 2010-09-08 19:24:24
Comment on Tutorial : equals( ) Versus == in Java By Mashoud
Hello Friends ,
s1 == s2 will always give false . Because s1 == s2 gives refers to the different memory location .
Note that , in java every object refers to the different memory locations. So , == will always give you false.
If we declare s1=s2 then it will give true . While s1.equals(s2) compares the character within the String object . So it will give true.
- Cloud Computing
- Java Beans
- Mac OS X
- Office 365
- Tech Reviews
Subscribe to Tutorials
1. hay is there any way to perform operation or calcu
View Tutorial By: neha at 2009-11-20 08:29:45
3. it's very good to understand...and it is helpful f
View Tutorial By: Rakesh at 2009-12-26 00:14:59
5. Hi, Can anyone please tell me where we need to cha
View Tutorial By: Gunjan at 2014-01-02 12:08:41
6. realy it was a nice basic example...and better def
View Tutorial By: amit kumar at 2011-03-14 08:11:31