ArrayList is one of the basic implementations of List interface and it’s part of Java Collections Framework. We can use iterator to traverse through ArrayList elements. Let’s check a sample program of ArrayList. package com.journaldev.collections; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; public class ConcurrentListExample { public static void main(String[] args) { List
Read full article from Java ArrayList vs CopyOnWriteArrayList and Exploring Iterator
No comments:
Post a Comment