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
sergey [27]
3 years ago
6

Write a public static method called getPIDs that has a parameter of type Map called nameToPID (keys are student names and values

are student PIDs). It should return a HashSet containing all PIDs in nameToPID.
Computers and Technology
1 answer:
Rasek [7]3 years ago
4 0

Answer:

Java program is explained below

Explanation:

import java.util.HashSet;

import java.util.Map;

import java.util.TreeMap;

public class TruckRace1 {

   public static HashSet<String> getPIDs (Map<String,String>nameToPID ){

       HashSet<String> pidSet = new HashSet<>();

       for(String ids: nameToPID.values()){

           pidSet.add(ids);

       }

       return pidSet;

   }

   public static void main(String[] args) {

       Map<String,String> pids = new TreeMap<>();

       pids.put("John","123");

       pids.put("Jason","124");

       pids.put("Peter","125");

       pids.put("Alice","126");

       pids.put("Peny","129");

       HashSet<String> ids = getPIDs(pids);

       for(String id:ids){

           System.out.println(id);

       }

   }

}

You might be interested in
Xavier buys a new laptop for $540. He makes a down payment $75 and pays the rest in 6 equal monthly payments, p. What equation r
mylen [45]

Explanation:

so you want to subtract 540-75=465

so 465 is what he has to pay total so now we break it up into equal parts

465/6=77.5

so he would pay $77

3 0
3 years ago
To play game, go inside the Grand Theft Auto V folder and right click and runGTAVLauncher as administrator.If you get any missin
yanalaym [24]

Answer and Explanation

The answer is true because when this error occurs, Microsoft Visual C++ is not installed in your PC, so firstly, download the 64bit version. Once installed restart your PC then open game software If still occur then follow the methods such as

If the error still exists then this software will be removed and fix all error.ensure that you have already installed we setup in your PC and both

Vcredist_x64_2012_x64 and

vcredist_x64_2012_x86

8 0
3 years ago
When planning a backup strategy, ideally one needs to prioritize important data and only back up what is absolutely necessary fo
exis [7]

The available options are:

Emails

Financial spreadsheets

User downloads

Databases

Answer:

User downloads

Explanation:

The correct answer is User downloads, this is because, the downloaded files are in cloud or another website memory or database, which serves as an alternative backup already. Thus, those downloaded files can still be recovered at later time when one needs to get the files back.

However, Emails, Financial spreadsheets and Databases, do not have any other place to retrieve them, because they are originally created and are yet to be uploaded to cloud or another website memory space to serves as alternative back up.

4 0
4 years ago
Which of the following is NOT a factor of identifying graphic design?
kolezko [41]

Answer:

i think it is a

Explanation:

sorry if it is wrong

4 0
3 years ago
Read 2 more answers
IMPORTANT!!<br><br> How can you get real answer keys for edmentum (plato) courses as a student?
dimulka [17.4K]

Answer:

Looking up the answer on google works but in my experience if you put the whole question onto brainly then look for the one with the best stars and most then the answer will be correct, thats how i have 100% on all my assingments, sorry if this isnt the answer you wanted but it helps

Explanation:

4 0
3 years ago
Other questions:
  • WHOEVER HELPS ASAP GETS BRAINLiEST!!!!!!!!! :)
    15·2 answers
  • What type of lights are necessary for silhouettes?
    12·2 answers
  • How did the discovery of glossopteris support wegner's continental drift hypothesis?
    15·1 answer
  • When should students practice netiquette in an online course? Check all that apply.
    14·2 answers
  • You can use Facebook's Live Feed tool to broadcast content as you post it, true or false?
    11·1 answer
  • If you are logged on to Windows Live Messenger, why would you be unable to engage
    6·1 answer
  • Which criteria can cuboids/frame selectors be coloured by​
    15·1 answer
  • What are candid shots? what are posed shots?
    13·1 answer
  • Algorithm to eat orange<br><br>​
    10·2 answers
  • Frequently used _____________ can be saved as _____________ for use in analysis, dashboards, reports, tickets, and alerts.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!