Write Method Accept Array Strings Method Return String Comes Strings Lexicographical Order Q43779896
Write a method will accept an array of Strings. This methodshould return the string that comes after all the other strings inlexicographical order.
(Assume all the Strings only contain lower case letters. InExample: 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)
{
}
Expert Answer
Answer to Write a method will accept an array of Strings. This method should return the string that comes after all the other stri…
OR