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
This is your code.
topjm [15]

Answer:

11

Explanation:

the second in the d aray is c because to call the first value, it is d[0]. So, to call c, you put d[2]. And the 0 of the c array, or the 0 of the 2 of the d array, it is 11

put it in a program. I use JS so if you have an Apple, open script editor and change the script from AppleScript to JavaScript and put in this code:

var a = [5, 10, 15];

var b = [2, 4, 6];

var C = [11, 33, 55];

var d = [a, b, C];

d[2][0];

3 0
3 years ago
A downloaded executable file may contain harmful software known as
mylen [45]

Answer:

A downloaded executable file may contain harmful software know as malware.

Further details:

Malwares:

Malware (a portmanteau for pernicious programming) is any product purposefully intended to make harm a PC, server, customer, or PC network. Malware does the harm after it is embedded or brought somehow or another into an objective's PC and can appear as legitimately executable code, contents, supposed "dynamic substance" (Microsoft Windows), and different types of data. Some sorts of malware are to a great extent alluded to in the media as PC infections, worms, Trojan steeds, ransomware, spyware, adware, and scareware, among different terms. Malware has a malignant expectation, acting against the enthusiasm of the PC client—thus does exclude programming that causes accidental damage because of some lack, which is regularly portrayed as a product bug.

Uses:

Malware is once in a while utilized comprehensively against government or corporate sites to assemble monitored information, or to upset their activity as a rule. However, malware can be utilized against people to pick up data, for example, individual recognizable proof numbers or subtleties, bank or charge card numbers, and passwords.

Answer details:

Subject: Computer and technology

Level: College

Keywords:

• Harmful software

• Malware

• Malware software

• Uses of malware

• Purpose of malware

Learn more to evaluate:

brainly.com/question/4997492

brainly.com/question/4010464

brainly.com/question/1754173

8 0
3 years ago
Read 2 more answers
Why is local hosting not suitable for a public website?
ruslelena [56]

Answer:

Because its only available to the host

Explanation:

8 0
3 years ago
Which description best applies to a macro?
Mama L [17]

A macro is that pseudo-program that performs a list of actions based on a set of instructions.

<h3>What is macro?</h3>

A macro can be said to be a number of commands that help you to get complex things done via automating simple and via repetitive tasks.

A macro is that pseudo-program that performs a list of actions based on a set of instructions.

Therefore, option A is correct as the macros does a whole lot of work.

Learn more about macro from

brainly.com/question/20050035

#SPJ1

6 0
2 years ago
Andy wants to install a new Internet connection. He wants to take the fastest he can get. What are the maximum speeds for the fo
aksik [14]

Answer:

1. so if i wanted to build a linux server for web services(apache) with 1cpu and 2 gb of memory.-operating at 75% of memory capacity2. a windows server with 2 cpu/ 4gb memory- operating at 85% of memory capacity3. a storage server with 1 cpu/ 2gb memory- operating at 85% of memory capacityhow much memory do i have to add for each server. so that the utilization rate for both cpu and memory is at a baseline of 60%."the details for the cpu like its processor or the memory's speed isnt to be concerned" yeah i kept asking my teacher if he's even sure about the but the whole class seems to be confused and the project is due in 3 days..this is a virtualization project where i have to virtualize a typical server into an exsi hypervisor.

5 0
3 years ago
Other questions:
  • True / False<br> Registers are generally optimized for capacity instead of speed.
    14·1 answer
  • An analyst is reviewing the logs from the network and notices that there have been multiple attempts from the open wireless netw
    13·1 answer
  • You are in charge of designing a menu tree for navigating 1,250 books in a digital library. Present an argument of whether the m
    12·1 answer
  • Electromagnetic waves used in ovens and cell phone communications are called
    6·1 answer
  • In most software packages, the function key F1 is used to run the _____program.
    10·1 answer
  • Why do you classify computers?
    6·1 answer
  • What are the classifications of computer
    9·1 answer
  • Please HELP me it a test and it due rn. Please no links
    9·1 answer
  • Question 19
    9·2 answers
  • Which three statements are true of lossless compression?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!