str2.equalsIgnoreCase(s1: String): boolean
class equalsignor
{
public static void main(String[] arg)
{
String str1 = "Welcome to Smartprogrammeron.blogspot.in";
String str2 = new String("Welcome to SmartProgrammerOn.blogspot.in");
System.out.println("str1.equals(str2) is " + str1.equals(str2));
System.out.println("str1.equalsIgnoreCase(str2) is " + str1.equalsIgnoreCase(str2));
}
}
str2.equalsIgnoreCase(s1: String): boolean ;- it ignore upper and lower case but str1.equals(str2:String):boolean will not ignore upper and lower case.
{
public static void main(String[] arg)
{
String str1 = "Welcome to Smartprogrammeron.blogspot.in";
String str2 = new String("Welcome to SmartProgrammerOn.blogspot.in");
System.out.println("str1.equals(str2) is " + str1.equals(str2));
System.out.println("str1.equalsIgnoreCase(str2) is " + str1.equalsIgnoreCase(str2));
}
}
str2.equalsIgnoreCase(s1: String): boolean ;- it ignore upper and lower case but str1.equals(str2:String):boolean will not ignore upper and lower case.