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.
correct
Is there any connection between the implementation of the class1 to the question ?
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.