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]
2 years ago
10

How to create a comparator generic type in java.

Computers and Technology
1 answer:
KIM [24]2 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
) Printers today have many features that include improved quality, photo printing capabilities, digital camera connectivity, bui
Sidana [21]

Explanation:

Some of the most important features needed in a printer are:

  • fast printing speed
  • support wireless connectivity
  • support colored/uncolored printing
  • include improved text quality,
  • improved photo printing capabilities

Based on market prices available on the Amazon website, a printer with the above capabilities start at a price range of <em>at least</em> $80.

4 0
3 years ago
E. what component must be compatible with every other component of the computer?
Kryger [21]
The correct answer: The motherboard 

The motherboard which is a piece of technology which has most of the electronics of a personal computer is (usually) found at the center most part of a Central Processing unit (CPU).

The motheboard needs to be compatible with all the components found in the Central Processing Unit because almost all the important components is connected to it. Just imagine if the power which the power suppy supplies to the motherboard is inadequate due to electrical incompatibility, do you think the Central processing unit will work? It won't. As a matter of fact if you turn on the CPU, it will just switch off on itself in just a few seconds. 
8 0
3 years ago
Live.com is Microsoft's free web-based email provider.<br> A. True<br> B. False
Zigmanuir [339]
True Live.com is Microsoft's free web- based email provider
5 0
3 years ago
Guess The Song: <br> What Popping Brand New Whip Just Hopped In, I Got options
Georgia [21]

Answer:

its called whats poppin lol

Explanation:

:)

7 0
3 years ago
What will the following loop display? 0 1 2 3 4 5 0 1 2 3 4 0 1 2 3 4 The loop will display numbers starting at 0, for infinity.
Sidana [21]

Answer:

muestra números que comienzan en 0

Explanation:

7 0
3 years ago
Other questions:
  • A(n ____ with a drop down menu provides consistency in function and appearance making it easy for users to learn and work with t
    7·1 answer
  • Different units of CPU ?
    12·1 answer
  • ORANGE COLORED SIGNS AND FLAGS MEAN THAT YOU MUST BE ALERT FOR:
    8·2 answers
  • Drag each label to the correct location on the image.
    10·1 answer
  • How do i move a file in python3
    10·1 answer
  • Use the drop-down menus to describe how Adnan can add shapes to his presentation.
    11·1 answer
  • When adopting the use of social media in emergency management, it is important to have
    10·1 answer
  • Write a Python3 program to check if 3 user entered points on the coordinate plane creates a triangle or not. Your program needs
    12·1 answer
  • A student registers for a course in a university. Courses may have limited enrollment i.e a student must
    5·1 answer
  • Please help it’s timed
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!