How much time and effort are you willing to spend to get something good? As long as it takes, we think. After all, you're currently trying to become a programmer. Let's see how long it takes to make 10,000 get calls on a LinkedList and an ArrayList. The getGetTimeInMs method must return its execution time in milliseconds.
Time for 10,000 get calls
You must be signed in to leave a comment
13 May 2021, 20:01
Like Peter, I also do not understand why the 'get10000' method does split the array in half. In this way only 5.000 items are retrieved. The body of the method 'get10000' should be:
19 November 2021, 00:35
...for each insertion in a list the fill() method returns the list size's...therefore the new object is inserted in decreasing list index order... "...println->(getGetTimeInMs->(fill(new Arraylist())))". Java - Encapsulation, Encapsulation is one of the four fundamental OOP concepts. The other three are inheritance, polymorphism, and abstraction. Encapsulation in Java is a mechanism of wrapping the data (variables) and code acting on the data (methods) together as a single unit. In encapsulation, the variables of a class will be hidden from other classes, and can be accessed only through the methods of their current class.
Anonymous #10690611 Java Developer
10 February 2021, 18:42
in get10000, why do we use list.size()/2. Why do we need to split by half?
6 December 2020, 19:00
hint: deja vu to the previous task.
21 July 2020, 15:02
Roman explain the code.
10 May 2019, 15:24