I'm not sure why the "Hello WOrld! :: " of first SOP does not print on console when i run this program?
nans nav
Greenhorn
Joined: Jun 07, 2007
Posts: 8
posted
0
in case of first SOP i.e System.out.println("Hello World! :: "+ s1==s2); comparing is made like this : (("Hello World! :: "+ s1) == s2 which will return you false. If you keep the s1==s2 in braces you will get the desired result: System.out.println("Hello World! :: "+ (s1==s2));