-
Create java files to make this code compile and run.
-
What five objects are created in the main? First, an ArrayList of Dogs is created, then 3 Dog objects are created, Lastly, a Comparator object is created.
-
Can you spot the Comparator constructor call? Where is the class definition for the Comparator? Yes, the Comparator constructor call is located on line 15. Class MyCompare3 imports the Comparator class on line 2. Comparator's method "compare(obj a, obj b)" is overridden in order to sort the list in a particularly useful way.
a-brenner / cisc275-fall2019-first-git Goto Github PK
View Code? Open in Web Editor NEWLab3 git repository