a. Write a Java method called longestWord that takes one argument which is a 1D arr of String of name words and return the longest string which has maximum number characters. The header is: public static String longestWord (String[] words) b. In the main method, define an array of String named arrl with 10 items. read from the user the 10 words and store them in the array arrl. call the method longestWord to determine the longest word and then print
a. Write a Java method called longestWord that takes one argument which is a 1D arr of String of name words and return the longest string which has maximum number characters. The header is: public static String longestWord (String[] words) b. In the main method, define an array of String named arrl with 10 items. read from the user the 10 words and store them in the array arrl. call the method longestWord to determine the longest word and then print
Related questions
Question
100%
Q_1
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps