String Case Ignore

String Case Ignore Example



/** 

 *
 */ 
package com.first; 

 /** 
 * 
@author chintha Ramu 
 * 
 */ 

public class CaseIgnore { 

 /** 
 * @param args 

 */ 
 public static void main(String[] args) {
 // TODO Auto-generated method stub 

 String lower ="java"; 

 String higher = "JAVA"; 

 String thirdString = "abcd"; 

 System.out.println(lower.equalsIgnoreCase(higher));

 System.out.println(lower.equalsIgnoreCase(thirdString)); 

System.out.println(higher.equalsIgnoreCase(thirdString));                                                       

}
 }

Output:


0 comments:

Post a Comment