Java equalsIgnoreCase() Method


The String equalsIgnoreCase() method is used to compare two strings for equality but it ignores case differences.


Syntax:

 boolean equalsIgnoreCase(String str)

Example:

 public class EqualsIgnoreCase{  
    public static void main(String args[]){  
        String s1="Onlinetpoint"; 
        String s2="ONLINETPOINT"; 
        System.out.println(s1.equalsIgnoreCase(s2));
    }
}



Onlinetpoint is optimized for basic learning, practice and more. Examples are well checked and working examples available on this website but we can't give assurity for 100% correctness of all the content. This site under copyright content belongs to Onlinetpoint. You agree to have read and accepted our terms of use, cookie and privacy policy.