class StringDemo
{
public static void main(String args[])
{
String a="Happy";
String b="Unhappy";
int i=b.compareTo(a);
System.out.println("The comparison is: "+i);
}
}
{
public static void main(String args[])
{
String a="Happy";
String b="Unhappy";
int i=b.compareTo(a);
System.out.println("The comparison is: "+i);
}
}
No comments:
Post a Comment