write a program that reads a list of words. then, the program outputs those words and their frequencies. the input begins with an integer indicating the number of words that follow. assume that the list will always contain fewer than 20 words, and each word contains fewer than 10 characters. ex: if the input is: 5 hey hi mark hi mark the output is:



Answer :

A program that reads a list of words. then, the program outputs those words and their frequencies. the input begins with an integer indicating the number of words that follow is given below:

The Program

import java.util.Scanner;

public class LabProgram {

  /* Define your method here */

  public static void main(String[] args) {

     /* Type your code here. */

  }

}

A sample input and output are given below:

Input

5 hey hi Mark hi mark

Output

hey 1

hi 2

Mark 1

hi 2

mark 1

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1