When to use LinkedList over ArrayList in Java

Java 8Object Oriented ProgrammingProgramming

LinkedList should be used where modifications to a collection are frequent like addition/deletion operations. LinkedList is much faster as compare to ArrayList in such cases. In case of read-only collections or collections which are rarely modified, ArrayList is suitable.

raja
Published on 06-Feb-2018 09:58:49
Advertisements