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
Use fuel with the _____________ rating recommended by your vehicle manufacturer. A ) Converter B) Emission C) Exhaust D) Octane
Free_Kalibri [48]
I would say the correct answer is "octane". It is important that you use the fuel with  the correct octane rating recommended by the manufacturer. Among the choices it is only octane that is used as a rating for fuels. Hope this helps.
7 0
3 years ago
Read 2 more answers
Variables set equal to patterns are said to be:_______.
NemiM [27]

Answer:

b. instantiated.

Explanation:

In computer programming, to be instatiated or when variables are instatiated; this simply refers to the acts of making example out of a group variables or a form of template. For example in a situation of class of objects.

Hence, in this case, the correct answer to the question above is the option B, in which Variables set equal to patterns are said to be INSTATIATED

5 0
3 years ago
Concentric circles on a disk platter where data is stored;________
bagirrra123 [75]

Answer:

Tracks

Resilient File System (ReFS)

Explanation:

  1. Concentric circles on a disk platter where data is stored is called Tracks
  2. The new file system developed for Windows Server 2012 is called Resilient File System (ReFS). It allows increased stability for disk storage and improved features for data recovery and error checking
4 0
3 years ago
Question 4
Tcecarenko [31]

Answer: squared ← number * number

Explanation:

4 0
3 years ago
Seth would like to make sure as many interested customers as possible are seeing his business’s website displayed in their searc
GenaCL600 [577]

Answer:

Hi! Make sure that the website has a few things. Proper Keywords, the pages have the proper tags, a form on the website, contact information, CIty State, Etc., Then a phone number. Social media icons that link properly to the social media pages.

Explanation:

5 0
3 years ago
Other questions:
  • ____ indicates the number of pixels that a computer uses to display the letters, numbers, graphics, and background on a screen.
    12·2 answers
  • Which wireless technology has a typical transfer rate of 1 Mbps to 3 Mbps at distances up to about 10 meters?
    7·1 answer
  • On other questions, how do I write my own question, without commenting on others questions? It is only allowed two, I think, the
    13·1 answer
  • "When you can control devices and appliances by apps installed on your smartphone or tablet, you are said to have"
    6·1 answer
  • ____ are programs that need to be attached to other files to install themselves on computers without the users’ knowledge or per
    5·1 answer
  • Customizing ads to people who had earlier visited the site is
    14·1 answer
  • You are developing a system to process lists of days of the week, represented as strings. Create a function is_weekend that cons
    12·1 answer
  • What are the benefits of building redundancy into a network?
    12·1 answer
  • What do you hope will be in/added GTA 6?
    13·1 answer
  • Que es una red de datos
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!