public class MainClass { public static void main(String[] arg) { String a = "a"; String b = "A"; if(a.equalsIgnoreCase(b)){ System.out.println("a==b"); }else{ System.out.println("a!=b"); } }} a==b