equals and equalsIgnoreCase in String java example
how to use equals and equalsIgnoreCase in String java example
public class Test {
public static void main(String[] args) {
String st = new String("Test String Here");
String st1 = new String("test string here");
System.out.println(st.equals(st1));
System.out.println(st.equalsIgnoreCase(st1));
}
}
public class Test {
public static void main(String[] args) {
String st = new String("Test String Here");
String st1 = new String("test string here");
System.out.println(st.equals(st1));
System.out.println(st.equalsIgnoreCase(st1));
}
}
Comments
Post a Comment