Java program for two strings


#1

Write a java program to compare two strings lexicographically, ignoring case differences.


#2

import java.util.*;
class Demo
{
public static void main(String args[])
{
String s1,s2;
Scanners=new Scanner(System.in);
s1=s.next();
s2=s.next();
if(s1.compareToIgnoreCase(s2)==0)
System.out.println("two strings are equal);
}
}