Assignment 50
import java.util.Scanner;
public class CompareTo
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
System.out.print("Comparing \"spider\" with \"spiderman\" produces ");
System.out.println("spider".compareTo("spiderman"));
System.out.print("Comparing \"sandwich\" with \"sand\" produces ");
System.out.println("sandwich".compareTo("sand"));
System.out.print("Comparing \"bare\" with \"mare\" produces ");
System.out.println("bare".compareTo("mare"));
System.out.print("Comparing \"apples\" with \"oranges\" produces ");
System.out.println("apples".compareTo("oranges"));
System.out.print("Comparing \"abc\" with \"abc\" produces ");
System.out.println("abc".compareTo("abc"));
System.out.print("Comparing \"bread\" with \"butter\" produces ");
System.out.println("bread".compareTo("butter"));
System.out.print("Comparing \"jump\" with \"jump\" produces ");
System.out.println("jump".compareTo("jump"));
System.out.print("Comparing \"zebra\" with \"horse\" produces ");
System.out.println("zebra".compareTo("horse"));
System.out.print("Comparing \"house\" with \"home\" produces ");
System.out.println("house".compareTo("home"));
System.out.print("Comparing \"duck\" with \"duck\" produces ");
System.out.println("duck".compareTo("duck"));
System.out.print("Comparing \"thought\" with \"thought\" produces ");
System.out.println("thought".compareTo("thought"));
System.out.print("Comparing \"it's\" with \"its\" produces ");
System.out.println("it's".compareTo("its"));
System.out.print("Comparing \"were\" with \"were\" produces ");
System.out.println("were".compareTo("were"));
System.out.print("Comparing \"omega\" with \"alpha\" produces ");
System.out.println("omega".compareTo("alpha"));
System.out.print("Comparing \"you\" with \"me\" produces ");
System.out.println("you".compareTo("me"));
}
}