Menu

Make a program that will use the following array String sport = (“lacrosse”, “basketball”, “hockey”, “soccer’ “football”, “cricket”; Write a method called findLongest that will use the sports array to…

Question

Answered step-by-step

Make a program that will use the following array String sport =…

Make a program that will use the following array String sport = (“lacrosse”, “basketball”, “hockey”, “soccer’ “football”, “cricket”;

Write a method called findLongest that will use the sports array to determine the longest word in the array. The method will return the String value and display in the main. 
Write another method called findAverage that will use the same sports array to find the average length of the words. The program will return the integer value and display in the main.

OR

Leave a Reply

Your email address will not be published. Required fields are marked *