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
When Kim was working in her Microsoft® Excel® spreadsheet, she accidentally placed her book on the spacebar and erased the conte
zaharov [31]

Answer:

The undo tool.

Explanation:

Microsoft Excel is a spreadsheet application developed by Microsoft, it is used for analysing data. It's worksheets are made up of columns and rows or fields and records.

There are different ways of entering data to a cell. Click on the cell and type the data, copy and paste to the target cell, double-click on the cell to correct data and click on a cell and press the spacebar key to clear the data.

Excel records the action of event, so when a mistake is made like deleting a crucial cell data value, the undo tool is used to recover the data, since it holds records of events. The redo tool is the reverse of the undo tool.

5 0
3 years ago
In a shallow copy, ____. the values of two or more pointers are copied into a list two or more pointers of the same type point t
strojnjashka [21]

Answer:

Explanation:

A Shallow copy is a bit-wise (unit of data) copy of an object that can be found/used in an object-oriented programming language code, the copy contains all of the same exact values that exist within the original object. In a shallow copy, two or more pointers of the same type point to the same memory location.

8 0
2 years ago
Read 2 more answers
What is the purpose of the Scene group in 3-D maps?
Otrada [13]

Answer:

The capability of having an integrated 2D-3D environment allows you to work with your data, maps, and scenes alongside one another. You can quickly switch between maps and scenes as well as link them together for a synchronized viewing experience.

Explanation:

3 0
2 years ago
Sharon is troubleshooting a computer and wants to test the hard drive in another computer. Sharon removes the hard drive and not
spayn [35]

Answer:

The correct answer to the following question will be "Molex connector".

Explanation:

  • Molex connector seems to be the dialect term for the connectivity of a two-piece plug and socket. The two-piece concept was pioneered by the company named Molex Connector and has become an established electronic design.
  • Inside a PC case, it brings DC control to the devices. The wide one of those on the right is being used for discs, DVD and CD-ROM drives, whereas the narrow one is being used for floppy along with other items.

Therefore, Sharon has to use the Molex connector to test any type of drive in their device.

4 0
3 years ago
the set of methods that can be used to acquire, organize, store, manipulate, and transmit information is known as .
Nina [5.8K]

Information technology is the umbrella term for a collection of processes that can be used to collect, arrange, organize, store, alter, and transfer data.

Technology: What Is It?

Technology is the systematic and repeatable body of scientific to achieve practical objectives. The result of such an effort is sometimes known as technology. The use of tech is pervasive in many areas, including daily life, science, industry, communication, and transportation. Both real things like the machines or the utensils and intangible tools like software are considered technologies. Computer technology (IT) is indeed the practice of creating, processing, storing, retrieving, and exchanging various types of data and information using computers. Technology used for information and communications includes IT.

To know more about Technology
brainly.com/question/7788080
#SPJ4

3 0
1 year ago
Other questions:
  • Define inheritance. give an example
    11·1 answer
  • A nonpipelined system takes 300ns to process a task. The same task can be processed in a 5-segment pipeline with a clock cycle o
    10·1 answer
  • Write two separate formulas using different commands that concatenate " john and "smith" together to form " John Smith"
    9·1 answer
  • For this lab, you will work on a simple GUI application. The starting point for your work consists of four files (TextCollage, D
    5·1 answer
  • What linux command is used to change file permissions?
    10·1 answer
  • The two mathematical models of language description are generation and recognition. Describe how each can define the syntax of a
    10·1 answer
  • Help me right now!!!!!!!!!!!!!!!!!!!!!!!!11
    15·1 answer
  • DTE just installed 500kW of solar capacity on the MCCC campus. the cost of the installation was about $3 million. what was the c
    10·1 answer
  • Software that allows users to use and adapt it for any purpose, often allowing the public to participate in further development
    7·2 answers
  • Type the correct answer in the box. Use numerals instead of words. If necessary, use / for the fraction bar.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!