Question: Write a Java program to find the longest word in a given dictionary ( two - dimensional array ) and the number of this word's

Write a Java program to find the longest word in a given dictionary (two-dimensional array) and the number of this word's occurrences.
Write a method named findLongestWordAndOccurrences which finds the longest word and the number of occurrences.
The Method's Input: A two-dimensional array.
The Method's Output: Display both the word and the number of its occurrences.
Write a method named printArray to display the contents of your 2D array.
The Method's Input: A two-dimensional array.
The Method's Output: Display every word in that array, one single dimensional array (row) per line.
In the main method:
1. Fill the dictionary (the two-dimensional array) with a list of words of your choice.
2. Call the printArray method to display the contents of your dictionary.
3. Call the findLongestWordAndOccurrences method.

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!