I am new at programming and I have never done Java before. I am in my first Java class and we are asked to complete the following question...Complete the method printLargestAnimal below.
Consider the three Strings "dog", "cat", and "monkey". In lexicographical order, "monkey" is the largest of the three, since "monkey" appears the latest in an English dictionary. Write a method called printLargestAnimal, which takes three animal names as Strings and prints the largest one by size of name according to the compareTo method from String class. Thus, if the method were passed "dog", "cat", and "monkey", it would print "monkey".
I am totally lost and have no idea how to use the compareTo method. I don't understand how to get it to print out the animal name. Thank you