Page 38 - Abstract Class, Interface & Struktur Data
P. 38

ArrayList vs. LinkedList










             •        The LinkedList class is a collection which can contain many objects of




                      the same type, just like the ArrayList.



             •        The LinkedList class has all of the same methods as the ArrayList class




                      because they both implement the List interface. This means that you



                      can add items, change items, remove items and clear the list in the



                      same way.



             •        However, while the ArrayList class and the LinkedList class can be used



                      in the same way, they are built very differently.
   33   34   35   36   37   38   39   40   41   42   43