About 42,700 results
Open links in new tab
  1. How do I know whether to use an array or an arraylist?

    Jul 21, 2014 · One more difference on Array vs ArrayList is that you can create instance of ArrayList without specifying size, Java will create Array List with default size but its mandatory …

  2. What is difference between array and ArrayList? - Stack Overflow

    May 19, 2014 · array : similar data typed elements and the size is limited. arraylist : is a collection which is capable of saving different data typed objects,And is growable.

  3. java - what is the difference between a list and an arraylist

    Sep 4, 2012 · Vector is another List, much like an ArrayList in that its implementation is based on a dynamic array; it's, however, a relic of the older versions of Java and is guaranteed to be …

  4. What is the difference between an Array, ArrayList and a List?

    Closed 10 years ago. I am wondering what the exact difference is between a Array, ArrayList and a List (as they all have similar concepts) and where you would use one over the other. …

  5. Are there reasons to prefer Arrays over ArrayLists? [duplicate]

    May 12, 2014 · The ArrayList implementation uses an underlying array, but all accesses have to go through the get(), set(), remove(), etc. methods which means it goes through more code …

  6. Array or List in Java. Which is faster? - Stack Overflow

    Apr 4, 2009 · List<String> strings = new ArrayList<String>(); This separation of Abstract Data Type and specific implementation is one the key aspects of object oriented programming. An …

  7. When to use LinkedList over ArrayList in Java? - Stack Overflow

    The first difference between ArrayList and LinkedList comes with the fact that ArrayList is backed by Array while LinkedList is backed by LinkedList. This will lead to further differences in …

  8. ArrayList<String> vs String [], How and when to use?

    Oct 18, 2020 · Moreover, ArrayList has a set of methods to access elements and modify them. But, the ArrayList just can store Object and the storing speed is more slower. For the answer …

  9. java - Array vs ArrayList in performance - Stack Overflow

    Oct 16, 2013 · ArrayList is internally backed by Array in Java, any resize operation in ArrayList will slow down performance as it involves creating new Array and copying content from old array …

  10. Performance differences between ArrayList and LinkedList

    May 18, 2012 · The ArrayList must move all the elements from array[index] to array[index-1] starting by the item to delete index. The LinkedList should navigate until that item and then …