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
Vladimir79 [104]
3 years ago
10

How to create a comparator generic type in java.

Computers and Technology
1 answer:
KIM [24]3 years ago
8 0

Answer:

public class Person {

//fields

private int id;

private String name;

private Payment pay;

//constructor

public Person(String name, int id,

int startSal, int startBon){

this.name = name;

this.id = id;

this.pay = new Payment(startSal, startBon);

}

//method get name

public String getName(){

return name;

}

//method get id

public int getId(){

return id;

}

//method get start salary

public int getStartSalary(){

return pay.startSalary;

}

//method get start bonus

public int getStartBonus(){

return pay.startBonus;

}

//inner payment class

private class Payment{

int startSalary;

int startBonus;

public Payment(int sal, int bon){

this.startSalary = sal;

this.startBonus = bon;

You might be interested in
Porque sophia es un robot mujer?
gregori [183]
Sophia es un robot humanoide (ginoide) desarrollado por la compañía, con sede en Hong Kong, Hanson Robotics. Ha sido diseñada para aprender, adaptarse al comportamiento humano y trabajar con estos satisfactoriamente.
7 0
3 years ago
A technician is buying a PC that will host three VMs running at the same time with the current configuration. The technician bel
raketka [301]

Answer:

B. SSD

Explanation:

VMs or virtual machines are virtually created environment for multiple operating system on a host operating system. The host operating system has an extension called Hyper-V. The hyper-V manager helps to manage the virtual machine's activities.

The VMs can hold applications in their respective containers, which requires a partition of the storage. So when more VMs are configured, more storage memory is required to store their individual data. The VMs in a computer system can share a network interface card.

7 0
3 years ago
Help me<br> please help me helping me is good help me
laiz [17]

Explanation:

Output will be 4.

STAY SAFE, STAY HAPPY

7 0
3 years ago
How do you flash your high beams ?​
Bad White [126]

Answer: to flash your high beams you have to basically put on and turn them off really quickly here is what the button looks like :)

Hope this helps you out :)

7 0
3 years ago
Read 2 more answers
The best answer it requests services, data and other resources available on the server​
Brilliant_brown [7]

Answer:

Explanation:

?

6 0
3 years ago
Read 2 more answers
Other questions:
  • Select the correct answer.
    7·2 answers
  • In this problem we consider sending real-time voice from Host A to Host B over a packet-switched network (VoIP). Host A converts
    12·1 answer
  • In which situation will file compression be required to complete the task
    15·1 answer
  • Explain the need for data structures when developing software.
    12·1 answer
  • There is the Iphone MAX, Iphone XR and Iphone XS. which iphone is the very NEWEST and which one do you recommend? explain.
    5·2 answers
  • Jane is creating a slide that will have a large heading and number of bullet points below it. What slide format should she use?
    12·1 answer
  • In C complete the following:
    12·1 answer
  • Write a formula that would return a TRUE result if the sum of the first five numbers in a column of data are negative
    7·1 answer
  • What channel does the news come on? <br><br> i dont have cable i have roku :\
    8·1 answer
  • Use your editor to open the cc_data.js file and study the data stored in the staff object to become familiar with its contents a
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!