Using the knowledge in computational language in JAVA it is possible to write a code that reads a list of words.
<h3>Writting the code in JAVA:</h3>
<em>import java.util.*;</em>
<em>//class name LabClass</em>
<em>public class LabClass{</em>
<em>    //function getFrequencyOfWord with array wordList, ListSize and currWord as parameter</em>
<em>    public static int getFrequencyOfWord(String[] wordsList, int ListSize, String currWord){</em>
<em>        int frequency = 0;</em>
<em>        //for loop for iteration </em>
<em>        for(int i=0; i<ListSize; i++){</em>
<em>            //if current word matches with words present in list</em>
<em>            //then increase the frequency by 1</em>
<em>            if(wordsList[i].compareTo(currWord)==0){</em>
<em>                frequency++;</em>
<em>            }</em>
<em>        }</em>
<em>        //return frequency at last </em>
<em>        return frequency;</em>
<em>    }</em>
<em>    //main function </em>
<em>    public static void main(String[] args) {</em>
<em>        //creating object of Scanner class </em>
<em>        Scanner sc = new Scanner(System.in);</em>
<em>        int size;</em>
<em>        //asking user to input size of list </em>
<em>        System.out.println("Enter the size of list :");</em>
<em>        size = sc.nextInt();</em>
<em>        //creating array of same size as user input size</em>
<em>        String[] wordList = new String[size];</em>
<em>        sc.nextLine();</em>
<em>        //asking user to input array elements </em>
<em>        System.out.println("Enter list elements one by one :");</em>
<em>        for(int i =0; i<size; i++)</em>
<em>        {</em>
<em>            wordList[i] = sc.nextLine();</em>
<em>        }</em>
<em>        System.out.print("\n");</em>
<em>        sc.close();</em>
<em>        //calling function getFrequencyOfWord in every iteration by passing</em>
<em>        //required arguments to it </em>
<em>        for(int i=0; i<size; i++)</em>
<em>        {</em>
<em>            String currWord = wordList[i];</em>
<em>            int count = getFrequencyOfWord(wordList, size, currWord);</em>
<em>            //printing result </em>
<em>            System.err.println(currWord + " : " + count);</em>
<em>        }</em>
<em>    }</em>
<em>}</em>
See more about JAVA at brainly.com/question/12978370
#SPJ1