Hi Ranchers
Here in these three codes, when i compare to real strings then it results true. but when i trim the
string which has space and compare it then it gives false.
I understand that string with space will sit on the another place in string pool and it's a different object. But once we trim it then it won't comapre the same string objects?
Confuse in these fact.
System.out.println("java"=="java"); // true
System.out.println((" Java".trim()).equals("Java")); // false
System.out.println(" Lower Case = " + (("JAVA".toLowerCase())=="java")); // false