Hi All,
Could anyone please explain the reason for these answers
if("String".toString() == "String")
System.out.println("Equal");
else
System.out.println("Not Equal");
Answer:
the code will compile an print "Equal".
--------------------------------------------------------------------------------
if("
String ".trim() == "String")
System.out.println("Equal");
else
System.out.println("Not Equal");
Answer:
the code will compile an print "Not Equal".
--------------------------------------------------------------------------------
Thanks for any early response
SDave Bee..