Question: Exercise 12.59 Write a class that can make comparisons between the efficiency of the common methods from the List interface in the ArrayList and LinkedList
Exercise 12.59
Write a class that can make comparisons between the efficiency of the common methods from the List interface in the ArrayList and LinkedList classes such as add, get, and remove. Use the polymorphic-variable technique described above to write the class so that it only knows it is performing its tests on objects of the interface type List rather than on the concrete types ArrayList and LinkedList. Use large lists of objects for the tests, to make the results significant. You can use the currentTimeMillis method of theSystem class for getting hold of the start and finish time of your test methods.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
