1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ilia_Sergeevich [38]
3 years ago
11

java Write a program that reads a list of words. Then, the program outputs those words and their frequencies. The input begins w

ith an integer indicating the number of words that follow. Assume that the list will always contain less than 20 words.
Computers and Technology
1 answer:
vfiekz [6]3 years ago
6 0

Answer:

The following are the program in the Java Programming Language.

//set a package

import java.util.Scanner;

//define class

public class Main  

{

 //define a main method

 public static void main(String[] args)  

 {

   //declare the Scanner class object

   Scanner s = new Scanner(System.in);

   //get the size of the array from the user

   int size=s.nextInt();

   //declare an integer array with given size

   int a[]=new int[size];

   //declare a string array with given size

   String word[]=new String[size];

   //set the for loop  

   for(int i=0;i<size;i++)

   //get string input from the user

   word[i]=s.next();

   //iterates with the array, increase the count

   for(int i=0;i<size;i++)  

   {

     for(int j=0;j<size;j++)  

     {

       //check that elements of words

       if(word[i].equals(word[j]))

         //increament in the array by 1

         a[i]++;

     }

   }

   System.out.print("\n");

   //set for loop to print the following result

   for(int i=0;i<size;i++)

     System.out.println(word[i]+" "+a[i]);

  }

}

Explanation:

<u>The following are the description of the program</u>.

  • Firstly, set the required predefined package and define class 'main then, define main method inside the class and inside the method.
  • Declare the object of the scanner class and get the size of the array through the object in the variable 'size'.
  • Then, declare two array which are integer type 'a' with the given input size and string type 'word' with the given input size.
  • Set the for loop that get string type array elements from the user and again set two for loop that increase the size of the integer data type array by 1 with the loop iteration.
  • Finally, set the for loop that print the following result.
You might be interested in
I need it ASAP, brainliest to whoever answers correctly!
velikii [3]

Answer:

E

Explanation:

i think it is E because if you think about it they don't make everything accurate on normal mapping its just to give you an idea of where to go or find.

6 0
3 years ago
In a ________ system configuration, separate information systems are designed and managed by each foreign unit.
jeyben [28]

Answer:

In a <u><em>decentralized</em></u> system configuration, separate information systems are designed and managed by each foreign unit.

Explanation:

hopes this help (:

4 0
2 years ago
Choose the option that best matches the description given. The older term, social service, referred to advancing human welfare.
egoroff_w [7]

Answer:

Social Assistance

Explanation:

Provision and disbursement of intervention in other to palliate the suffering and want of an individual, group or community can be described as rendering social assistance. Assistance which also means helping people fulfill their needs could be offered by the government, non-governmental organizations or individuals personnels. Rendering social assistance could be in the form of cash or gift offerings, provision of food for the hungry, shelter for the homeless, medical interventions for the sick and catering for other touch points of the needy.

4 0
3 years ago
Which of the following button should always be included when designing a navigation pictures escape contact FAQ
evablogger [386]

Answer: Escape

Explanation: Exiting/Escaping current state within navigation is the universally needed action. Navigation menus can be complex and are hierarchical in nature. Users make mistakes and the only remedy is an escape function.

4 0
4 years ago
Read 2 more answers
A field value is currently not in any group. what happens when you try adding it to an existing group?
ivann1987 [24]

When a  field value is currently not in any group,  What happens when you try adding it to an existing group is that It is removed from the "all" list, and placed under its new group.

<h3>What is a  field value?</h3>

The value of a field  can be described as the  string of bytes,  which do contains  all bytes in the field after the first colon.

The field value function is is useful in a case whereby extraction of the field data from linked data types is needed.

It is a good method thst used when writing formulas that refer to data types, and that is why the field value do help the user when creating a conditional calculations using a linked data types.

It also gives the enablement in the extraction of the exact values from the cell linked to data types.

It should be noted that this field value is  concatenation of all the lines  found in the the field, outside the  starting name and colon, hence When a  field value is currently not in any group,  What happens when you try adding it to an existing group is that It is removed from the "all" list, and placed under its new group.

Find out more on field value at brainly.com/question/843074

#SPJ1

6 0
1 year ago
Other questions:
  • Which WAN technology is designed to work with a variety of commonly used layer-2 protocols and is sometimes called a layer-2.5 t
    15·1 answer
  • Digital subscriber lines: a. are very-high-speed data lines typically leased from long-distance telephone companies. b. operate
    5·1 answer
  • Write a Java program that will 1. Ask the user to type in a sentence, using a JOptionPane.showInputDialog(). 2. The program will
    10·1 answer
  • 1 When would you find the merging cells feature useful?
    6·2 answers
  • Are Proxy Servers illegal if im using it to surpass Facebook or something because it is banned
    12·1 answer
  • What is VLSI stand for​
    14·1 answer
  • Who wants brainliest? First to answer gets it....
    12·2 answers
  • Trish has bought a new computer that she plans to start on after a week
    5·1 answer
  • Go to this link: https://platform.breakoutedu.com/game/play/going-buggy-78#
    8·1 answer
  • Fundamental of Computer Science
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!