You define a class by using the following code:

HOTSPOT
You define a class by using the following code:

You write the following code for a method (line numbers are included for reference only):

To answer, complete each statement according to the information presented in the code.

HOTSPOT
You define a class by using the following code:

You write the following code for a method (line numbers are included for reference only):

To answer, complete each statement according to the information presented in the code.

Answer:



Leave a Reply 3

Your email address will not be published. Required fields are marked *


rao

rao

correct

Zag

Zag

Is there any connection between the implementation of the class1 to the question ?

Guest

Guest

Yes: Line 8 sorts the list (didn’t see it at first as well). This sorts the list and the order is changed, having User3 with the id 3 (the smallest id) at position 0 in the array.