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
Vanyuwa [196]
3 years ago
7

How do you do this question?

Computers and Technology
1 answer:
elena55 [62]3 years ago
4 0

Answer:

for (scores.Entry<String, Integer> entry : scores.entrySet()) {

          int value=0; String key="Rambo";

          String k = entry.getKey();

           int v = entry.getValue();

           if (v>value)

           {

               value =v;

           }

           else

           {

               value=value;

           }  

       }

       for( scores.Entry<String, Integer> entry : scores.entrySet())

      {

        if( entry.getValue()==value)            

        System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue());

      }

Explanation:

The above scores are an object of Map type.  And this is a parameter of findUopStudent function. So scores is a Map, and entry is an item. And we get its key and value. Now we compare each value using senteniel method and find the maximum value. Now we iterate through the scores using for the look and check the value of each entry against the maximum value found, and we print out the entry with maximum value. And that is the top student, which is required.  

You might be interested in
True false) ther are five arrow keys on the keborad​
cluponka [151]

Answer:

false, there's only 4

Explanation:

5 0
3 years ago
if someone has become very attached to their mobile device and feels anxious if the cannot connect to the internet, what are the
svp [43]

Answer:

Anxiety

Explanation:

trust I have it

4 0
3 years ago
Define an interface GUIComponent consisting of four method declaration: open: void-returning, accepts no parameters close: both
Lesechka [4]

Answer:

interface GUIComponent{

  public void open();

  public boolean close();

  public void resize(int width, int height);

  public void move(int x, int y);

}

Explanation:

3 0
2 years ago
How to remove special formatting from a table in word.
ch4aika [34]

Answer:

Clear Format

Explanation:

7 0
2 years ago
What part of speech is contend
Amiraneli [1.4K]
Assuming the context, it would be considered a verb.

ie: "She contended to me that I was not acting maturely." 
7 0
3 years ago
Other questions:
  • ____ port is a connection in which eight data lines transmit an entire byte of data at one moment in time.
    12·1 answer
  • A statement describing both the requirements that must be met by a product or process amd the ways in which satisfaction of the
    8·2 answers
  • Does a BIOS reset erase data such as pictures, programs or other things like that?
    13·1 answer
  • Two technicians are discussing shielded cable. Technician A says that shielded wires are generally twisted in pairs to cancel th
    14·1 answer
  • In symmetric key cryptosystem, assume that Alice and Bob have set up a common key Kab. This key is only known to Alice and Bob.
    12·1 answer
  • Write code that uses the input string stream inSS to read input data from string userInput, and updates variables userMonth, use
    8·1 answer
  • What is the value of the variable result after these lines of code are executed?
    11·1 answer
  • What is computer specification
    15·1 answer
  • 4.(L.5.1.A) Select the sentence that includes an interjection,
    12·1 answer
  • How does the quantity of data affect the accuracy of an experiment?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!