Question: Write a method will accept an array of Strings. This method should return the string that comes after all the other strings in lexicographical order.

Write a method will accept an array of Strings. This method should return the string that comes after all the other strings in lexicographical order. (Assume all the Strings only contain lower case letters. In Example: No number, no Capitals and no Symbols)

lastString({hola, word, night, boom}) word lastString({java, is, so, much, fun}) so lastString({i, love, java}) love

//precondition: words.length >0 public static String lastString(String[] words) {

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!