We can read data two ways1:- using for loop like use get(int index) method.2:- using iterator of ArrayList. The first option is faster than using iterator. Because value stored in ArrayList is indexed access.
What is difference between ArrayList and vector?
What is difference between HashMap and HashTable?
What is difference between Arrays and ArrayList ?
What is difference between List and Set?
When to use ArrayList or LinkedList?
What is difference between iterator access and index access?
Which all classes implement Set interface?
Where you use List and where ArrayList?
If an ArrayList has to be iterate to read data only, what are the possible ways and which is the fastest?
What are the classes implementing List interface?
if accessing through iterator is slow then why do we need it and when to use it?
Which design pattern Iterator follows?
How to sort list in reverse order?
Can a null element added to a Treeset or HashSet?
How to sort list of strings - case insensitive?
How to make a List (ArrayList,Vector,LinkedList) read only?
How can Arraylist be synchronized?
How we can sort any class on the behalf of the properties of collection. Like we has a collection of named Employee objects we need shortlist by using Employee ID.
What is ConcurrentHashMap?
Which is faster to iterate LinkedHashSet or LinkedList?
Which data structure HashSet implements?
Arrange in the order of speed - HashMap,HashTable, Collections.synchronizedMap,concurrentHashmap?
What is IdentityHashMap?
What is WeakHashMap?
What is collection framework in Java? give its advantage?
What are the basic interfaces of Java Collections Framework?
What is the benefit of Generics in Collections Framework?
What are the Methods of Collection interface in Java?
What are difference between Iterator and ListIterator?
What is the difference between Iterator and Enumeration ?
What is an Iterator ?
How do you traverse through a collection using its Iterator?
How to obtain Array from an ArrayList ?
What is the difference between Comparable and Comparator Interface?
What is difference between HashMap and HashSet?
What is difference between fail-fast and fail-safe?
How to make a collection read only?
What is Garbage Collection in Java?
what is the purpose of finalize() method in java?
Why we override equals() method in java?
What is legacy class in java ?
Why we use Map interface? What are main classes implementing Map interface?
Simple Example of ArrayList in Java .
Simple Example of LinkedList in Java .
Simple Example of ListIterator Interface in Java .
Simple Example of HashSet class in Java .
Simple Example of TreeSet class in Java .
Simple Example of Sorting the elements in Java .
Simple Example of PriorityQueue in Java .
Simple Example of HashMap class in Java .
Simple Example of LinkedHashMap class in Java .
Simple Example of TreeMap class in Java .