class list java code example
Example 1: list class type java
List<String> myList = new ArrayList<String>();
return (Class<List<String>>)myList.getClass();
Example 2: list in java
LIST: Can store duplicate values,
Keeps the insertion order.
It allows multiple null values,
Also we can read a certain value by index.
- ArrayList not syncronized, array based class
- LinkedList not synchronized, doubly linked
- Vector is synchronized, thread safe