About 3,390,000 results
Open links in new tab
  1. List (Java Platform SE 8 ) - Oracle Help Center

    The List interface provides two methods to search for a specified object. From a performance standpoint, these methods should be used with caution. In many implementations they will perform costly linear searches. The List interface provides two methods to efficiently insert and remove multiple elements at an arbitrary point in the list.

  2. Java List Interface - GeeksforGeeks

    Apr 8, 2025 · The List Interface in Java extends the Collection Interface and is a part of the java.util package. It is used to store the ordered collections of elements. In a Java List, we can organize and manage the data sequentially. Key Features:

  3. java - Create a List of primitive int? - Stack Overflow

    Aug 2, 2013 · It's possible to create a list using a basic array, but you do have to know the size of the array to start with, and you'll lose a lot of other functionality that comes with the Collections object. But you could do something like: int [] array = new int [10]; long needs 8Bytes, Long needs 8Bytes plus 16Bytes for Object header (in 64bit system).

  4. Java ListHow To Create, Initialize & Use List In Java

    Apr 1, 2025 · This Java List Tutorial Explains How to Create, Initialize and Print Lists in Java. The tutorial also Explains List of Lists with Complete Code Example.

  5. Get generic type of java.util.List - Stack Overflow

    Dec 21, 2009 · Java uses something called type erasure, which means at runtime both objects are equivalent. The compiler knows the lists contain integers or strings, and as such can maintain a type safe environment. This information is lost (on an object instance basis) at runtime, and the list only contain 'Objects'.

  6. Java ArrayList - W3Schools

    Elements in an ArrayList are actually objects. In the examples above, we created elements (objects) of type "String". Remember that a String in Java is an object (not a primitive type). To use other types, such as int, you must specify an equivalent wrapper class: Integer.

  7. Java List Collection Tutorial and Examples - CodeJava.net

    Feb 10, 2025 · In this Java list tutorial, I will help you understand the characteristics of list collections, how to use list implementations (ArrayList and LinkedList) in day-to-day programming and look at various examples of common programming practices when using lists.

  8. Java List Interface - Tpoint Tech

    Apr 1, 2025 · One of the fundamental data structures in Java is the List interface that provides an ordered collection of elements with dynamic sizing. It is a part of Java Collections Framework, provides a versatile and ordered way to handle collections of elements.

  9. Java List Interface - Programiz

    In Java, the List interface is an ordered collection that allows us to store and access elements sequentially. It extends the Collection interface. Since List is an interface, we cannot create objects from it. In order to use the functionalities of the List interface, we can use these classes:

  10. The List Interface (The Java™ Tutorials > Collections > Interfaces)

    In addition to the operations inherited from Collection, the List interface includes operations for the following: Positional access — manipulates elements based on their numerical position in the list. This includes methods such as get, set, add, addAll, and remove.

  11. Some results have been removed