The compareTo method should return _____________ if the calling object equals the parameter.

a. A negative number
b. Zero
c. A positive number
d. Null

B

Computer Science & Information Technology

You might also like to view...

A form is used to enter data into a(n) ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

Assuming a linked list of n nodes, the code fragment:

Node curr = head; while (curr != null) { System.out.println(curr.getItem()); curr.setNext(curr.getNext()); } // end while requires ______ comparisons. a) n b) n – 1 c) n + 1 d) 1

Computer Science & Information Technology