[Memo] Java Linked List

ArrayList vs LinkedList in Java.jpg

ArrayList LinkedList and CopyOnWriteArrayList.jpg

linkedlist.png

java


        LinkedList<String> list = new LinkedList<String>();
        list.addLast("1");
        list.addLast("2");
        list.addLast("3");
        list.addLast("4");
        list.addLast("5");
        Log.d("****", list.toString());
        // [1, 2, 3, 4, 5]

        list.removeFirst();
        Log.d("****", list.toString());
        // [2, 3, 4, 5]

        list.removeFirst();
        Log.d("****", list.toString());
        // [3, 4, 5]

        list.removeFirst();
        Log.d("****", list.toString());
        // [4, 5]

        list.removeFirst();
        Log.d("****", list.toString());
        // [5]

        list.removeFirst();
        Log.d("****", list.toString());
        // []

        list.removeFirst();
        Log.d("****", list.toString());
        // NoSuchElementException

http://www.java67.com/2015/06/20-java-arraylist-interview-questions.html

http://javarevisited.blogspot.jp/2011/11/collection-interview-questions-answers.html

http://www.javatpoint.com/data-structure-interview-questions

Recommended Posts

[Memo] Java Linked List
Java memo
java anything memo
Java Silver memo
java, maven memo
Java memorandum (list)
Clone Java List.
Java SE 7 memo
java anything memo 2
Java specification memo
About List [Java]
Java pattern memo
[java] sort in list
Java development environment memo
java basic knowledge memo
Java Kuche Day memo
[Java ~ Method ~] Study memo (5)
java se 8 programmer Ⅰ memo
Java paid private memo
List of beginners (List) memo
About Java Array List
[Java ~ Array ~] Study memo 4
Java learning memo (basic)
java lambda expression memo
(Memo) Java for statement
Java learning memo (interface)
[Java] Implicit inheritance memo
Java learning memo (inheritance)
java competitive programming memo
Java (WebSphere Application Server) memo [1]
[Java] Variable name naming memo
Java memo (standard class) substring
[Java] List type / Array type conversion
Java learning memo (data type)
Java memo (standard class) length
Java Silver Study Method Memo
[Java ~ Boolean value ~] Study memo (2)
Create a java method [Memo] [java11]
Java Silver exam preparation memo
Java learning memo (abstract class)
[Java] Date Related Term Memo
Java study memo 2 with Progate
[Java] List OS-dependent standard libraries
List aggregation in Java (Collectors.groupingBy)
List data structure [Java / Scala]
What are Java metrics? _Memo_20200818
Java HashMap, entrySet [Personal memo]
[Java] Delete the elements of List
[Eclipse Java] Development environment setting memo
Java learning memo (creating an array)
Personal memo: Metaprogramming with Java reflection
JCA (Java Cryptography Architecture) Usage Memo
[Java] Memo for naming class names
Java method list (memorial) (under construction)
[Study session memo] Java Day Tokyo 2017
Sort a List of Java objects
Java learning memo (while statement, do-while statement)
[Java] Convert 1-to-N List to Map
Java
From Java to VB.NET-Writing Contrast Memo-
List of members added in Java 9