Compare Strings
public class Main { public static void main(String[] args) { String str1 = new String("JAVA"); String str2 = new String("java"); System.out.println(str1.equals("JAVA")); System.out.println(str1.equals(str2)); System.out.println(str1.equalsIgnoreCase(str2)); } } /* true false true */