Skip to main content

About toUpperCase and toLowerCase

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
hungpham
Offline
Joined: 2013-10-09

String a = "I Love You";
String change = a.toLowerCase();
System.out.println(change);
System.out.println("Answer: " + change.equals(a));

I thought the a value and change value should be the same because the UpperCase and Lowercase still remain the same value of a right guys?
But I got this:

i love you
Answer: false