Answers for ".equalsIgnoreCase for characters in java"

1

java equalsignorecase

public class JavaExample{
   public static void main(String args[]){
	String str1= new String("Apple");
	String str2= new String("MANGO");
	String str3= new String("APPLE");
	System.out.println("str1 equals to str2:"+str1.equalsIgnoreCase(str2));
	System.out.println("str1 equals to str3:"+str1.equalsIgnoreCase(str3));
	System.out.println("str1 equals to Welcome:"+str1.equalsIgnoreCase("Welcome"));
	System.out.println("str1 equals to Apple:"+str1.equalsIgnoreCase("Apple"));
	System.out.println("str2 equals to mango:"+str2.equalsIgnoreCase("mango"));
   }
}

this function doesn not differentiate caps and non caps letters.
Posted by: Guest on March-20-2021

Code answers related to ".equalsIgnoreCase for characters in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language