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
What does the Flippy Do Pro show about representing very small numbers?
chubhunter [2.5K]

Answer:

it shows number that is near the target figure, but not the actual figure

Explanation:

What Flippy Do Pro reveal about representing a very small number is a number that is near the expected number in value. This is because Flippy Do Pro would not reveal some particular lesser numbers in their precise value.

However, this often results in roundoff blunder, which is mostly caused by the inability of bit compositions to depict the outcome of numbers as it should precisely be.

4 0
2 years ago
Free points,
Radda [10]

Answer:

thank you i really needed that and plus i just lost point by putting a question i mean i was asking for help and i still don't know the answer

hope u feel better

5 0
2 years ago
Read 2 more answers
Why when you are on wifi it keeps kicking you off is your class during online learning​
Leviafan [203]
Sometimes, it lags on the other side or from the teachers computer so the app just kicks people out sometimes, it’s sucks I know
7 0
2 years ago
Read 2 more answers
Alice recently purchased a new cell phone. After her vacation, Alice wanted to transfer her holiday photos to her computer to do
dmitriy555 [2]

Answer:

<u>D.) Device Manager</u>

Explanation:

Indeed, the device manager administrative tool found on Windows allows the user to set up or add new hardware devices attached to the computer system.

For example, this tool allows the user to add external devices to the computer such as a printer, mobile device, etc that may not automatically be displayed.

5 0
2 years ago
List the data types that are allowed for SQL attributes.
nalin [4]

Answer:

Explanation:

In the SQL database manipulation coding language, there are a variety of different available data types to use. These data types are the following.

  • Numeric
  • Date/Time
  • Character/String
  • Unicode Character/String
  • Binary
  • 3rd Party / Miscellaneous

Each of these data types has a wide range of subcategories (data types as well) that each handle different variables in a coding sequence. These subcategories can be all seen in the attached picture below.

6 0
3 years ago
Other questions:
  • A type of touch screen that can be up to four feet by six feet is a(n) _____. plasma screen multitouch interface Electronic Pape
    10·2 answers
  • What ipconfig command line option can be used to delete cached dns information from memory?​?
    9·1 answer
  • Why computer is known as data processing system?
    14·1 answer
  • List the steps in setting up an online banking account
    12·2 answers
  • Which ofthe following sentence beginnings would be best to use in apersuasive request?
    8·1 answer
  • Why is there no I do you time of day when all students should study
    10·1 answer
  • Identify two real-world examples of problems whose solutions do scale well
    13·1 answer
  • Anyone here play osu! ?
    11·2 answers
  • Which are examples of basic text structures? Check all that apply.
    8·2 answers
  • How do we “read” and “write” in MAR and MDR memory unit, please help I am very confused :)
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!