Assignemnt #50 Compare To Challenge
Code
/// Name: Drew Boxold
/// Period: 5
/// Program Name: Compare To Challenge
/// File Name: CompareToChallenge.java
/// Date Finished: 11/18/15
public class CompareToChallenge
{
public static void main(String[] args)
{
System.out.print("Comparing \"boy\" with \"girl\" producues ");
System.out.println("boy".compareTo("girl"));
System.out.print("Comparing \"bicycle\" with \"tricycle\" producues ");
System.out.println("bicycle".compareTo("tricycle"));
System.out.print("Comparing \"soccer\" with \"futbol\" producues ");
System.out.println("soccer".compareTo("futbol"));
System.out.print("Comparing \"ronaldo\" with \"messi\" producues ");
System.out.println("ronaldo".compareTo("messi"));
System.out.print("Comparing \"brendo\" with \"gorgi\" producues ");
System.out.println("brendo".compareTo("gorgi"));
System.out.print("Comparing \"spanish\" with \"french\" producues ");
System.out.println("spanish".compareTo("french"));
System.out.print("Comparing \"english\" with \"history\" producues ");
System.out.println("english".compareTo("history"));
System.out.print("Comparing \"canon\" with \"nikon\" producues ");
System.out.println("canon".compareTo("nikon"));
System.out.print("Comparing \"apple\" with \"banana\" producues ");
System.out.println("apple".compareTo("banana"));
System.out.print("Comparing \"rap\" with \"rock\" producues ");
System.out.println("rap".compareTo("rock"));
System.out.print("Comparing \"run\" with \"walk\" producues ");
System.out.println("run".compareTo("walk"));
System.out.print("Comparing \"trident\" with \"five\" producues ");
System.out.println("trident".compareTo("five"));
}
}
Picture of the output