In order to compare objects of a class in different ways,

a) the class must implement the Comparable interface
b) the class must implement the Comparator interface
c) the class must inherit from the Comparator class
d) a separate class must be created that implements the Comparator interface and provides a body for the compare method
e) None of these is correct.


d) a separate class must be created that implements the Comparator interface and provides a body for the compare method

Computer Science & Information Technology

You might also like to view...

What is wrong with the following function template (Other than the fact that it really does almost nothing)?

What will be an ideal response? ``` template int f( int & x ) { return x; } int main() { int y = 3, z; z = f(y); } ```

Computer Science & Information Technology

When host computers are added to the VMM environment, a job is run to deploy _________ to the selected host computers.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

The EPAT rating system helps ensure computer systems have low total energy requirements

Indicate whether the statement is true or false

Computer Science & Information Technology

COGNITIVE ASSESSMENT Your business is looking to rely on cloud computing services to specify the applications, security settings, and computing resources available to employees on their computer desktops. What is the term for this?

A. Infrastructure as a Service B. Software as a Service C. Desktop as a Service D. Platform as a Service

Computer Science & Information Technology