Back To Java String Class Index
//program to demonstrate equalsignorecase method of String class to check whether two strings are equal or not public class stringequalsignorecase { public static void main(String[] args) { String ob=new String("abcdef"); String ob1=new String("ABCDEF"); boolean result; result=ob.equalsIgnoreCase(ob1); if(result==true) { System.out.println("two strings are equal"); } else { System.out.println("two strings are not equal"); } } }