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
Computer spreadsheet is a grid of​
Kruka [31]
Huh we’re, we’re is the computer screen shot
3 0
2 years ago
What is a bitmap ???
leva [86]
<span>a representation in which each item corresponds to one or more bits of information, especially the information used to control the display of a computer screen.
</span><span>represent (an item) as a bitmap.
</span>
4 0
3 years ago
Read 2 more answers
Substance abuse is an _____ coping mechanism.
hichkok12 [17]
Mental coping mechanism.
7 0
2 years ago
Me pueden ayudar a hacer un proyecto de tecnología? mi fb es Erick Escaron (foto de perfil de free fire y dice veterano)
trapecia [35]

Answer:

tecnología? mi fb es Eri

8 0
3 years ago
Mark each statement as true or false: a. PATA hard drives are older and slower than SATA hard drives. b. SATA1 is about 10 times
deff fn [24]

Answer:

The answer to this question can be described as follows:

a) True

b) False

c) False

d) False

e) False

f) True

Explanation:

In option a,  PATA device is used to connect the hard drives into systems.  Its title suggests, depends on parallel transmitting technology, contrasted to the compulsive-signaling tools.

In option b, SATA1 is a first-generation device, and SATA3 third generation, that's why it is wrong.

In option c and option d, both were wrong because RAID 0 and RAID 5 are Cloud computing software for storing data.

In option e, An internal SATA data cable with an eSATA port can not be used as an additional connection is provided by the eSATA port.

In option f, It is true because there are 7 pins in internal SATA.

6 0
3 years ago
Other questions:
  • Which type of statement is used to communicate one’s feelings in a nonconfrontational manner?
    14·1 answer
  • In a Comparative Government course, the first unit focuses on the US Congress and the
    8·1 answer
  • Are computer virus and human virus the same​
    6·1 answer
  • which of the following is a component of a rope-rewind starter system? a. a recoil spring c. an air vane governor b. a wrist pin
    5·1 answer
  • What can be the maximum possible length of an identifier 3163 79 can be of any length​
    5·1 answer
  • How are online sources used? Check all that apply.
    8·2 answers
  • Match the ernerging technologies to their descriptions.
    14·1 answer
  • Website managers use____ every day.
    10·2 answers
  • I NEED THIS ASAP PLS
    12·1 answer
  • When constructing policies regarding data _______________, it is important that these policies offer particular guidance on sepa
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!