String s1 = "a";
String s2 = "A";
// Check if identical
boolean b = s1.equals(s2); // false
// Check if identical ignoring case
b = s1.equalsIgnoreCase(s2); // true
StringBuffer sbuf = new StringBuffer("a");
b = s1.contentEquals(sbuf); // true
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment