{"id":401,"date":"2022-07-29T21:13:57","date_gmt":"2022-10-22T13:00:36","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/java%e3%81%aelinkedlist-java%e3%81%aelinkedlist\/"},"modified":"2025-07-31T23:18:15","modified_gmt":"2025-07-31T14:18:15","slug":"java%e3%81%aelinkedlist-java%e3%81%aelinkedlist","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aelinkedlist-java%e3%81%aelinkedlist\/","title":{"rendered":"Java\u306eLinkedList &#8211; Java\u306eLinkedList"},"content":{"rendered":"<p>Java\u306eLinkedList\u306f\u3001List\u3068Deque\u306e\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u306e\u5b9f\u88c5\u3067\u3059\u3002\u3053\u308c\u306f\u983b\u7e41\u306b\u4f7f\u7528\u3055\u308c\u308bList\u306e\u5b9f\u88c5\u30af\u30e9\u30b9\u306e\u4e00\u3064\u3067\u3059\u3002LinkedList\u306fAbstractSequentialList\u3092\u62e1\u5f35\u3057\u3001List\u3068Deque\u306e\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u3092\u5b9f\u88c5\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u9806\u5e8f\u4ed8\u3051\u3089\u308c\u305f\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3067\u3042\u308a\u3001\u91cd\u8907\u3057\u305f\u8981\u7d20\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\u8981\u7d20\u306f\u633f\u5165\u3055\u308c\u305f\u9806\u5e8f\u3067\u4fdd\u7ba1\u3055\u308c\u307e\u3059\u3002\u307e\u305f\u3001null\u8981\u7d20\u306e\u8ffd\u52a0\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u57fa\u3065\u304f\u64cd\u4f5c\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002List\u306e\u57fa\u672c\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u5b66\u3073\u305f\u3044\u5834\u5408\u306f\u3001\u3053\u306e\u6295\u7a3f\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\uff1aJava List\u3002<\/p>\n<h3>\u6295\u7a3f \u7c21\u5358\u306a\u76ee\u6b21\u8868<\/h3>\n<p>\u3053\u306e\u6295\u7a3f\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u6982\u5ff5\u306b\u3064\u3044\u3066\u8b70\u8ad6\u3057\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>Java LinkedList<\/li>\n<li>Java LinkedList Class Diagram<\/li>\n<li>Java LinkedList List Methods<\/li>\n<li>Java LinkedList Deque Methods<\/li>\n<li>Java LinkedList Basic Example<\/li>\n<li>Java LinkedList Generics<\/li>\n<li>Java Array to LinkedList<\/li>\n<li>Java LinkedList to Array<\/li>\n<li>Java LinkedList Real-time Usecases<\/li>\n<li>Internal Representation of Java LinkedList<\/li>\n<li>How Insertion works in Java LinkedList?<\/li>\n<li>How Deletion works in Java LinkedList?<\/li>\n<li>Java LinkedList Deque Operations<\/li>\n<li>Java SE 8: Java LinkedList to Stream<\/li>\n<li>Java SE 9 LinkedList<\/li>\n<\/ul>\n<h3>Java\u306eLinkedList\u3092\u8a00\u3044\u63db\u3048\u308b\uff1a<\/h3>\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001Java\u306eLinkedList\u306b\u3064\u3044\u3066\u306e\u91cd\u8981\u306a\u30dd\u30a4\u30f3\u30c8\u306b\u3064\u3044\u3066\u8b70\u8ad6\u3057\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>Java LinkedList class is a member of the Java Collections Framework.<\/li>\n<li>It is an implementation of the List and Deque interfaces.<\/li>\n<li>Internally, it is an implemented using Doubly Linked List Data Structure.<\/li>\n<li>It supports duplicate elements.<\/li>\n<li>It stores or maintains it\u2019s elements in Insertion order.<\/li>\n<li>We can add any number of null elements.<\/li>\n<li>It is not synchronised that means it is not Thread safe.<\/li>\n<li>We can create a synchronised LinkedList using Collections.synchronizedList() method.<\/li>\n<li>In Java applications, we can use it as a List, stack or queue.<\/li>\n<li>It does not implement RandomAccess interface. So we can access elements in sequential order only. It does not support accessing elements randomly.<\/li>\n<li>When we try to access an element from a LinkedList, searching that element starts from the beginning or end of the LinkedList based on where that elements is available.<\/li>\n<li>We can use ListIterator to iterate LinkedList elements.<\/li>\n<li>From Java SE 8 on-wards, we can convert a LinkedList into a Stream and vice-versa.<\/li>\n<li>Java SE 9 is going to add couple of factory methods to create an Immutable LinkedList.<\/li>\n<\/ul>\n<h3>Java\u306eLinkedList\u30af\u30e9\u30b9\u306e\u30c0\u30a4\u30a2\u30b0\u30e9\u30e0<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65648c19daa94e2bdf7bc4eb\/8-0.jpg\" alt=\"\" \/><\/div>\n<h3>Java\u306eLinkedList\u30ea\u30b9\u30c8\u30e1\u30bd\u30c3\u30c9\u306b\u3064\u3044\u3066\u306e\u65e5\u672c\u8a9e\u306e\u8868\u73fe: \u300cJava LinkedList\u306e\u30ea\u30b9\u30c8\u30e1\u30bd\u30c3\u30c9\u300d<\/h3>\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u4fbf\u5229\u3067\u3088\u304f\u4f7f\u7528\u3055\u308c\u308bJava LinkedList\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002\u6b21\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001List\u307e\u305f\u306fCollection\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u304b\u3089\u7d99\u627f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>size\uff08\uff09\uff1a\u30ea\u30b9\u30c8\u5185\u306e\u8981\u7d20\u6570\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>isEmpty\uff08\uff09\uff1a\u30ea\u30b9\u30c8\u304c\u7a7a\u3067\u3042\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>contains\uff08Object o\uff09\uff1a\u6307\u5b9a\u3055\u308c\u305f\u8981\u7d20\u304c\u3053\u306e\u30ea\u30b9\u30c8\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u5834\u5408\u3001true\u3092\u8fd4\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>iterator\uff08\uff09\uff1a\u3053\u306e\u30ea\u30b9\u30c8\u306e\u8981\u7d20\u306b\u5bfe\u3059\u308b\u30a4\u30c6\u30ec\u30fc\u30bf\u3092\u6b63\u3057\u3044\u9806\u5e8f\u3067\u8fd4\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>toArray\uff08\uff09\uff1a\u3053\u306e\u30ea\u30b9\u30c8\u306e\u3059\u3079\u3066\u306e\u8981\u7d20\u3092\u6b63\u3057\u3044\u9806\u5e8f\u3067\u542b\u3080\u914d\u5217\u3092\u8fd4\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>add\uff08E e\uff09\uff1a\u6307\u5b9a\u3055\u308c\u305f\u8981\u7d20\u3092\u30ea\u30b9\u30c8\u306e\u672b\u5c3e\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>remove\uff08Object o\uff09\uff1a\u6307\u5b9a\u3055\u308c\u305f\u8981\u7d20\u306e\u6700\u521d\u306e\u51fa\u73fe\u3092\u3053\u306e\u30ea\u30b9\u30c8\u304b\u3089\u524a\u9664\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>retainAll\uff08Collection c\uff09\uff1a\u3053\u306e\u30ea\u30b9\u30c8\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u8981\u7d20\u306e\u307f\u3092\u4fdd\u6301\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>clear\uff08\uff09\uff1a\u30ea\u30b9\u30c8\u304b\u3089\u3059\u3079\u3066\u306e\u8981\u7d20\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>get\uff08int index\uff09\uff1a\u30ea\u30b9\u30c8\u5185\u306e\u6307\u5b9a\u3055\u308c\u305f\u4f4d\u7f6e\u306e\u8981\u7d20\u3092\u8fd4\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>set\uff08int index\u3001E element\uff09\uff1a\u30ea\u30b9\u30c8\u5185\u306e\u6307\u5b9a\u3055\u308c\u305f\u4f4d\u7f6e\u306e\u8981\u7d20\u3092\u6307\u5b9a\u3055\u308c\u305f\u8981\u7d20\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>listIterator\uff08\uff09\uff1a\u30ea\u30b9\u30c8\u5185\u306e\u8981\u7d20\u306b\u5bfe\u3059\u308b\u30ea\u30b9\u30c8\u30a4\u30c6\u30ec\u30fc\u30bf\u3092\u8fd4\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>subList\uff08int fromIndex\u3001int toIndex\uff09\uff1a\u6307\u5b9a\u3055\u308c\u305ffromIndex\uff08\u542b\u3080\uff09\u304b\u3089toIndex\uff08\u6392\u4ed6\u7684\uff09\u307e\u3067\u306e\u30ea\u30b9\u30c8\u306e\u4e00\u90e8\u3092\u8fd4\u3057\u307e\u3059\u3002\u8fd4\u3055\u308c\u308b\u30ea\u30b9\u30c8\u306f\u3053\u306e\u30ea\u30b9\u30c8\u306b\u3088\u3063\u3066\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3055\u308c\u308b\u305f\u3081\u3001\u8fd4\u3055\u308c\u308b\u30ea\u30b9\u30c8\u3067\u306e\u975e\u69cb\u9020\u7684\u306a\u5909\u66f4\u306f\u3053\u306e\u30ea\u30b9\u30c8\u306b\u53cd\u6620\u3055\u308c\u3001\u9006\u3082\u307e\u305f\u540c\u69d8\u3067\u3059\u3002<\/ol>\n<h3>Java\u306eLinkedList Deque\u30e1\u30bd\u30c3\u30c9\u3002<\/h3>\n<p>LinkedList\u30af\u30e9\u30b9\u3067\u72ec\u81ea\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u306f\u3001Deque\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u304b\u3089\u7d99\u627f\u3055\u308c\u305f\u7279\u5b9a\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>void addFirst(E e): \u3053\u306e\u30ea\u30b9\u30c8\u306e\u5148\u982d\u306b\u6307\u5b9a\u3055\u308c\u305f\u8981\u7d20\u3092\u633f\u5165\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>void addLast(E e): \u3053\u306e\u30ea\u30b9\u30c8\u306e\u672b\u5c3e\u306b\u6307\u5b9a\u3055\u308c\u305f\u8981\u7d20\u3092\u633f\u5165\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>E getFirst(): \u3053\u306e\u30ea\u30b9\u30c8\u306e\u6700\u521d\u306e\u8981\u7d20\u3092\u53d6\u5f97\u3057\u307e\u3059\u304c\u3001\u524a\u9664\u306f\u3057\u307e\u305b\u3093\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u3053\u306e\u30ea\u30b9\u30c8\u304c\u7a7a\u306e\u5834\u5408\u306b\u4f8b\u5916\u3092\u30b9\u30ed\u30fc\u3059\u308b\u70b9\u3067peekFirst\u3068\u7570\u306a\u308a\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>E getLast(): \u3053\u306e\u30ea\u30b9\u30c8\u306e\u6700\u5f8c\u306e\u8981\u7d20\u3092\u53d6\u5f97\u3057\u307e\u3059\u304c\u3001\u524a\u9664\u306f\u3057\u307e\u305b\u3093\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u3053\u306e\u30ea\u30b9\u30c8\u304c\u7a7a\u306e\u5834\u5408\u306b\u4f8b\u5916\u3092\u30b9\u30ed\u30fc\u3059\u308b\u70b9\u3067peekLast\u3068\u7570\u306a\u308a\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>E remvoeFirst(): \u3053\u306e\u30ea\u30b9\u30c8\u304b\u3089\u6700\u521d\u306e\u8981\u7d20\u3092\u524a\u9664\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>E removeLast(): \u3053\u306e\u30ea\u30b9\u30c8\u304b\u3089\u6700\u5f8c\u306e\u8981\u7d20\u3092\u524a\u9664\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>boolean offerFirst(E e): \u6307\u5b9a\u3055\u308c\u305f\u8981\u7d20\u3092\u3053\u306e\u30ea\u30b9\u30c8\u306e\u524d\u306b\u633f\u5165\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>boolean offerLast(E e): \u6307\u5b9a\u3055\u308c\u305f\u8981\u7d20\u3092\u3053\u306e\u30ea\u30b9\u30c8\u306e\u672b\u5c3e\u306b\u633f\u5165\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>E pollFirst(): \u3053\u306e\u30ea\u30b9\u30c8\u306e\u6700\u521d\u306e\u8981\u7d20\u3092\u53d6\u5f97\u3057\u3066\u524a\u9664\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u3053\u306e\u30ea\u30b9\u30c8\u304c\u7a7a\u306e\u5834\u5408\u306fnull\u3092\u8fd4\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>E pollLast(): \u3053\u306e\u30ea\u30b9\u30c8\u306e\u6700\u5f8c\u306e\u8981\u7d20\u3092\u53d6\u5f97\u3057\u3066\u524a\u9664\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u3053\u306e\u30ea\u30b9\u30c8\u304c\u7a7a\u306e\u5834\u5408\u306fnull\u3092\u8fd4\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>E peekFirst(): \u3053\u306e\u30ea\u30b9\u30c8\u306e\u6700\u521d\u306e\u8981\u7d20\u3092\u53d6\u5f97\u3057\u307e\u3059\u304c\u3001\u524a\u9664\u306f\u3057\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001\u3053\u306e\u30ea\u30b9\u30c8\u304c\u7a7a\u306e\u5834\u5408\u306fnull\u3092\u8fd4\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>E peekLast(): \u3053\u306e\u30ea\u30b9\u30c8\u306e\u6700\u5f8c\u306e\u8981\u7d20\u3092\u53d6\u5f97\u3057\u307e\u3059\u304c\u3001\u524a\u9664\u306f\u3057\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001\u3053\u306e\u30ea\u30b9\u30c8\u304c\u7a7a\u306e\u5834\u5408\u306fnull\u3092\u8fd4\u3057\u307e\u3059\u3002<\/ol>\n<h3>Java\u306eLinkedList\u306e\u57fa\u672c\u7684\u306a\u4f8b<\/h3>\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001Java\u306eLinkedList\u306e\u57fa\u672c\u7684\u306a\u4f8b\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u3055\u3089\u306b\u4fbf\u5229\u306a\u64cd\u4f5c\u3092\u63a2\u7d22\u3057\u307e\u3059\u3002\u4f8b\uff1a<\/p>\n<pre class=\"post-pre\"><code>import java.util.LinkedList;\r\nimport java.util.List;\r\n\r\npublic class LinkedListDemo \r\n{\r\n  public static void main(String[] args) \r\n  {\r\n\tList names = new LinkedList();\r\n\tnames.add(\"Rams\");\r\n\tnames.add(\"Posa\");\r\n\tnames.add(\"Chinni\");\r\n        names.add(2011);\r\n\t\t\t\r\n\tSystem.out.println(\"LinkedList content: \" + names);\r\n\tSystem.out.println(\"LinkedList size: \" + names.size());\r\n  }\r\n}\r\n<\/code><\/pre>\n<p>\u7d50\u679c\uff1a<\/p>\n<pre class=\"post-pre\"><code>LinkedList content: [Rams, Posa, Chinni, 2011]\r\nLinkedList size: 4\r\n<\/code><\/pre>\n<p>\u3053\u3053\u3067\u306fLinkedList\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u30014\u3064\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002\u30ea\u30b9\u30c8\u306e\u8981\u7d20\u6570\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u3001LinkedList.size()\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u6ce8\u610f\uff1aGenerics\u3092\u4f7f\u7528\u305b\u305a\u306b\u3001Java LinkedList\u306f\u7570\u7a2e\u306e\u8981\u7d20\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002\u305f\u3060\u3057\u3001Generics\u3092\u4f7f\u7528\u3057\u306a\u3044\u3067\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306f\u304a\u52e7\u3081\u3067\u304d\u307e\u305b\u3093\u3002\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u3001\u5358\u7d14\u306a\u4f8b\u3092\u4f7f\u7528\u3057\u3066Java Generics\u306e\u5229\u70b9\u3068\u4f7f\u7528\u65b9\u6cd5\u3092\u63a2\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>Java\u306eLinkedList\u306e\u30b8\u30a7\u30cd\u30ea\u30af\u30b9\u3002<\/h3>\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001Java\u306eLinkedList\u3067Generics\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002Java\u306eGenerics\u306f\u3001\u578b\u5b89\u5168\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u884c\u3046\u305f\u3081\u306b\u5f79\u7acb\u3061\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3088\u308a\u5f37\u529b\u306a\u578b\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001\u30ad\u30e3\u30b9\u30c8\u306e\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u3092\u524a\u6e1b\u3059\u308b\u306e\u306b\u3082\u5f79\u7acb\u3061\u307e\u3059\u3002\u4f8b\u3048\u3070\uff1a<\/p>\n<pre class=\"post-pre\"><code>import java.util.LinkedList;\r\nimport java.util.List;\r\n\r\npublic class LinkedListGenericsDemo\r\n{\r\n  public static void main(String[] args) \r\n  {\r\n\tList&lt;String&gt; names = new LinkedList&lt;&gt;();\r\n\tnames.add(\"Rams\");\r\n\tnames.add(\"Posa\");\r\n\tnames.add(\"Chinni\");\r\n        \/\/ We cannot add other than Strings\r\n        \/\/ names.add(2011);\r\n\t\t\t\r\n\tSystem.out.println(\"LinkedList content: \" + names);\r\n\tSystem.out.println(\"LinkedList size: \" + names.size());\r\n  }\r\n}\r\n<\/code><\/pre>\n<p>\u7d50\u679c\uff1a<\/p>\n<pre class=\"post-pre\"><code>LinkedList content: [Rams, Posa, Chinni]\r\nLinkedList size: 3\r\n<\/code><\/pre>\n<p>\u3053\u3053\u3067\u306f\u3001\u30b8\u30a7\u30cd\u30ea\u30c3\u30af\u3092\u4f7f\u7528\u3057\u3066LinkedList\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u30013\u3064\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001LinkedList\u306bNumber\u3092\u8ffd\u52a0\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n<h3>Java\u306e\u914d\u5217\u3092\u30ea\u30f3\u30af\u30ea\u30b9\u30c8\u306b\u5909\u63db\u3059\u308b<\/h3>\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001Java\u306e\u914d\u5217\u3092LinkedList\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u63a2\u7d22\u3057\u307e\u3059\u3002\u591a\u304f\u306e\u65b9\u6cd5\u3067\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u3053\u3053\u3067\u306f\u4e00\u3064\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u306e\u307f\u3092\u793a\u3057\u307e\u3059\u3002\u4f8b\uff1a<\/p>\n<pre class=\"post-pre\"><code>\r\nimport java.util.LinkedList;\r\nimport java.util.List;\r\n\r\npublic class JavaArrayToLinkedListDemo \r\n{\r\n\tpublic static void main(String[] args) \r\n\t{\r\n\t\tInteger[] numbers = {1,2,3,4,5};\r\n\t\tList&lt;Integer&gt; numbersList = new LinkedList&lt;&gt;();\r\n\t\tfor(Integer s : numbers){\r\n\t\t\tnumbersList.add(s);\r\n\t\t}\r\n\t\tSystem.out.println(numbersList);\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u51fa\u529b\uff1a<\/p>\n<pre class=\"post-pre\"><code>[1, 2, 3, 4, 5]\r\n<\/code><\/pre>\n<h3>Java\u306eLinkedList\u3092\u914d\u5217\u306b\u5909\u63db<\/h3>\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001Java\u306eLinkedList\u3092\u914d\u5217\u306b\u5909\u63db\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u63a2\u3063\u3066\u3044\u304d\u307e\u3059\u3002\u591a\u304f\u306e\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u3053\u3067\u306f1\u3064\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u306e\u307f\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\u4f8b\uff1a<\/p>\n<pre class=\"post-pre\"><code>import java.util.Arrays;\r\nimport java.util.LinkedList;\r\nimport java.util.List;\r\n\r\npublic class LinkedListToJavaArrayDemo \r\n{\r\n\tpublic static void main(String[] args) \r\n\t{\t\t\r\n\t\tList&lt;Integer&gt; numbersList = new LinkedList&lt;&gt;();\r\n\t\tnumbersList.add(1);\r\n\t\tnumbersList.add(2);\r\n\t\tnumbersList.add(3);\r\n\t\tnumbersList.add(4);\r\n\t\tnumbersList.add(5);\r\n\t\tInteger[] numbers = new Integer[numbersList.size()];\r\n\t\t\r\n\t\tnumbers = numbersList.toArray(numbers);\r\n\t\tSystem.out.println(Arrays.toString(numbers));\r\n\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u7d50\u679c\uff1a<\/p>\n<pre class=\"post-pre\"><code>[1, 2, 3, 4, 5]\r\n<\/code><\/pre>\n<h3>Java\u306eLinkedList\u306e\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306b\u3064\u3044\u3066<\/h3>\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001Java\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067LinkedList\u3092\u4f7f\u7528\u3059\u308b\u969b\u306e\u3001\u6700\u826f\u306e\u5834\u5408\u3068\u6700\u60aa\u306e\u5834\u5408\u306e\u30b7\u30ca\u30ea\u30aa\u306b\u3064\u3044\u3066\u8a71\u3057\u5408\u3044\u307e\u3059\u3002\u6700\u826f\u306e\u5229\u7528\u4f8b\uff1a<\/p>\n<ul class=\"post-ul\">\n<li>When our frequently used operation is adding or removing elements in the middle of the List, LinkedList is the best class to use.<\/li>\n<\/ul>\n<p>\u306a\u305c\u306a\u3089\u3001\u30ea\u30b9\u30c8\u306e\u4e2d\u9593\u306b\u8981\u7d20\u3092\u8ffd\u52a0\u307e\u305f\u306f\u524a\u9664\u3059\u308b\u305f\u3081\u306b\u3055\u3089\u306b\u30b7\u30d5\u30c8\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u304b\u3089\u3067\u3059\u3002\u8a73\u7d30\u306f\u3001\u300cJ Java LinkedList\u306b\u304a\u3051\u308b\u633f\u5165\u306e\u4ed5\u7d44\u307f\u300d\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6700\u60aa\u306e\u4f7f\u7528\u30b1\u30fc\u30b9\u30b7\u30ca\u30ea\u30aa\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\uff1a<\/p>\n<ul class=\"post-ul\">\n<li>When our frequently used operation is retrieving elements from list, then LinkedList is the worst choice.<\/li>\n<\/ul>\n<p>\u306a\u305c\u3067\u3059\u304b\uff1f\u306a\u305c\u306a\u3089LinkedList\u306f\u9806\u6b21\u30a2\u30af\u30bb\u30b9\u306e\u307f\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3001\u30e9\u30f3\u30c0\u30e0\u30a2\u30af\u30bb\u30b9\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u306a\u3044\u304b\u3089\u3067\u3059\u3002\u8a73\u3057\u304f\u306f\u3001\u300cJava\u306eLinkedList\u3067\u524a\u9664\u304c\u3069\u306e\u3088\u3046\u306b\u52d5\u4f5c\u3059\u308b\u304b\u300d\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6ce8\u610f\uff1aLinkedList\u306fList\u3001Deque\u3001Cloneable\u3001\u304a\u3088\u3073Serializable\u3092\u5b9f\u88c5\u3057\u3066\u3044\u307e\u3059\u304c\u3001RandomAccess\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5b9f\u88c5\u3057\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<h3>Java\u306eLinkedList\u306e\u5185\u90e8\u8868\u73fe<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65648c19daa94e2bdf7bc4eb\/44-0.png\" alt=\"\" \/><\/div>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u5de6\u5074\u306e\u30ce\u30fc\u30c9\u90e8\u5206\u306f\u3001LinkedList\u5185\u306e\u524d\u306e\u30ce\u30fc\u30c9\uff08\u307e\u305f\u306f\u8981\u7d20\uff09\u3092\u6307\u3059\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u53f3\u5074\u306e\u30ce\u30fc\u30c9\u90e8\u5206\u306f\u3001LinkedList\u5185\u306e\u6b21\u306e\u30ce\u30fc\u30c9\uff08\u307e\u305f\u306f\u8981\u7d20\uff09\u3092\u6307\u3059\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\u4e2d\u592e\u306e\u30ce\u30fc\u30c9\u90e8\u5206\u306f\u3001\u5b9f\u969b\u306e\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/ol>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65648c19daa94e2bdf7bc4eb\/46-0.png\" alt=\"\" \/><\/div>\n<h3>Java LinkedList\u306b\u304a\u3051\u308b\u633f\u5165\u306e\u4ed5\u7d44\u307f\u306f\u3069\u306e\u3088\u3046\u306b\u6a5f\u80fd\u3057\u307e\u3059\u304b\uff1f<\/h3>\n<p>\u524d\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u3001LinkedList\u304c\u8981\u7d20\u3092\u30ce\u30fc\u30c9\u3068\u3057\u3066\u4fdd\u5b58\u3059\u308b\u65b9\u6cd5\u3092\u3059\u3067\u306b\u898b\u3066\u304d\u307e\u3057\u305f\u3002\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001Java\u306eLinkedList\u306e\u633f\u5165\u64cd\u4f5c\u304c\u5185\u90e8\u3067\u3069\u306e\u3088\u3046\u306b\u6a5f\u80fd\u3059\u308b\u304b\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u6211\u3005\u306e\u6700\u521d\u306eLinkedList\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30c7\u30fc\u30bf\u304c\u3042\u308b\u3068\u4eee\u5b9a\u3057\u307e\u3057\u3087\u3046\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>3. \u3053\u306eLinkedList\u306b\u5bfe\u3057\u3066\u3001\u6b21\u306e\u633f\u5165\u64cd\u4f5c\u3092\u884c\u3044\u307e\u3059\u3002<\/ol>\n<pre class=\"post-pre\"><code>linkedList.add(2,54);\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65648c19daa94e2bdf7bc4eb\/51-0.png\" alt=\"\" \/><\/div>\n<h3>Java\u306eLinkedList\u3067\u306e\u524a\u9664\u306e\u4ed5\u7d44\u307f\u306f\u3069\u306e\u3088\u3046\u306b\u6a5f\u80fd\u3057\u307e\u3059\u304b\uff1f<\/h3>\n<p>\u79c1\u305f\u3061\u306f\u65e2\u306b\u524d\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067LinkedList\u306e\u633f\u5165\u64cd\u4f5c\u306e\u5185\u90e8\u52d5\u4f5c\u3092\u898b\u3066\u304d\u307e\u3057\u305f\u3002\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001Java LinkedList\u306e\u524a\u9664\u64cd\u4f5c\u304c\u5185\u90e8\u3067\u3069\u306e\u3088\u3046\u306b\u6a5f\u80fd\u3059\u308b\u304b\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u79c1\u305f\u3061\u306e\u521d\u671f\u306eLinkedList\u306b\u306f\u3001\u6b21\u306e\u30c7\u30fc\u30bf\u304c\u3042\u308b\u3068\u4eee\u5b9a\u3057\u307e\u3057\u3087\u3046\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>3. \u3053\u306eLinkedList\u306b\u5bfe\u3057\u3066\u6b21\u306e\u633f\u5165\u64cd\u4f5c\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/ol>\n<pre class=\"post-pre\"><code>linkedList.remove(3);\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65648c19daa94e2bdf7bc4eb\/56-0.png\" alt=\"\" \/><\/div>\n<h3>Java\u306eLinkedList\u306eDeque\u64cd\u4f5c<\/h3>\n<p>\u3053\u3053\u3067\u306f\u3001LinkedList\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304cDeque\u3068\u3057\u3066\u3069\u306e\u3088\u3046\u306b\u52d5\u4f5c\u3059\u308b\u304b\u3092\u63a2\u6c42\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u64cd\u4f5c\u3092\u4f7f\u7528\u3057\u3066\u3001Queue\u3084Stack\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002\u79c1\u306e\u5f8c\u306e\u6295\u7a3f\u3067\u306f\u3001Stack\u3084Queue\u304c\u3069\u306e\u3088\u3046\u306b\u52d5\u4f5c\u3059\u308b\u304b\u3092\u8a73\u3057\u304f\u8aac\u660e\u3057\u307e\u3059\u3002\u4f8b\uff1a<\/p>\n<pre class=\"post-pre\"><code>import java.util.LinkedList;\r\nimport java.util.LinkedList;\r\nimport java.util.Deque;\r\n\r\npublic class LinkedListDequeOperationsDemo \r\n{\r\n  public static void main(String[] args) \r\n  {\r\n\tDeque names = new LinkedList();\r\n\tnames.add(2);\r\n\tnames.addFirst(1);\r\n\tnames.addLast(3);\r\n\tnames.addFirst(0);\r\n\tnames.addLast(4);\r\n\t\t\t\r\n\tSystem.out.println(\"LinkedList content: \" + names);\r\n\tSystem.out.println(\"LinkedList size: \" + names.size());\r\n\tnames.removeFirst();\r\n\tnames.removeLast();\r\n\t\r\n\tSystem.out.println(\"LinkedList content: \" + names);\r\n\tSystem.out.println(\"LinkedList size: \" + names.size());\t\r\n  }\r\n}\r\n<\/code><\/pre>\n<p>\u51fa\u529b:<\/p>\n<pre class=\"post-pre\"><code>LinkedList content: [0, 1, 2, 3, 4]\r\nLinkedList size: 5\r\nLinkedList content: [1, 2, 3]\r\nLinkedList size: 3\r\n<\/code><\/pre>\n<h3>Java SE 8\uff1aJava\u306eLinkedList\u3092Stream\u306b\u5909\u63db<\/h3>\n<p>\u3053\u3053\u3067\u306f\u3001LinkedList\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092Java SE 8\u306eStream\u30b3\u30f3\u30bb\u30d7\u30c8\u306b\u5909\u63db\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u63a2\u6c42\u3057\u307e\u3059\u3002\u4f8b\uff1a<\/p>\n<pre class=\"post-pre\"><code>import java.util.LinkedList;\r\nimport java.util.List;\r\n\r\npublic class LinkedListToStreamDemo \r\n{\r\n  public static void main(String[] args) \r\n  {\t\t\r\n\tList&lt;Integer&gt; numbersList = new LinkedList&lt;&gt;();\r\n\tnumbersList.add(1);\r\n\tnumbersList.add(2);\r\n\tnumbersList.add(3);\r\n\tnumbersList.add(4);\r\n\tnumbersList.add(5);\r\n\t\t\r\n\t\/\/convert List to stream\r\n\tnumbersList.stream().forEach(System.out::println);\r\n  }\r\n}\r\n<\/code><\/pre>\n<p>\u51fa\u529b\uff1a<\/p>\n<pre class=\"post-pre\"><code>1\r\n2\r\n3\r\n4\r\n5\r\n<\/code><\/pre>\n<h3>Java SE 9\u306eLinkedList\u3002<\/h3>\n<p>Java SE 9\u306b\u304a\u3044\u3066\u3001Oracle Corp\u306fImmutable List\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u4fbf\u5229\u306a\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u4e88\u5b9a\u3067\u3059\u3002\u3053\u308c\u3089\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u5b66\u3073\u305f\u3044\u5834\u5408\u306f\u3001\u79c1\u306e\u8a18\u4e8b\u300cJava SE 9: Factory Methods for Immutable List\u300d\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u304cJava\u306b\u304a\u3051\u308bLinkedList\u306b\u95a2\u3059\u308b\u7c21\u5358\u306a\u307e\u3068\u3081\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306eJava LinkedList\u306e\u4f8b\u304cLinkedList\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u30b9\u30bf\u30fc\u30c8\u306b\u5f79\u7acb\u3064\u3053\u3068\u3092\u9858\u3063\u3066\u3044\u307e\u3059\u3002\u79c1\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u8aad\u3093\u3067\u3044\u305f\u3060\u304d\u3001\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002\u3082\u3057\u3088\u308d\u3057\u3051\u308c\u3070\u3001\u79c1\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u304c\u5f79\u306b\u7acb\u3063\u305f\u308a\u3001\u554f\u984c\u3084\u63d0\u6848\u3001\u30bf\u30a4\u30d7\u30a8\u30e9\u30fc\u306a\u3069\u304c\u3042\u308c\u3070\u3001\u30b3\u30e1\u30f3\u30c8\u3092\u6b8b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Java\u306eLinkedList\u306f\u3001List\u3068Deque\u306e\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u306e\u5b9f\u88c5\u3067\u3059\u3002\u3053\u308c\u306f\u983b\u7e41\u306b\u4f7f\u7528\u3055\u308c\u308bList\u306e\u5b9f\u88c5\u30af\u30e9\u30b9\u306e\u4e00\u3064\u3067\u3059\u3002LinkedList\u306fAbstractSequentialList\u3092\u62e1\u5f35\u3057\u3001List [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,61],"class_list":["post-401","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-26","tag-61"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Java\u306eLinkedList - Java\u306eLinkedList - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"Java\u306eLinkedList - Java\u306eLinkedList\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/java\u306elinkedlist-java\u306elinkedlist\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java\u306eLinkedList - Java\u306eLinkedList\" \/>\n<meta property=\"og:description\" content=\"Java\u306eLinkedList - Java\u306eLinkedList\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/java\u306elinkedlist-java\u306elinkedlist\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-22T13:00:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T14:18:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65648c19daa94e2bdf7bc4eb\/8-0.jpg\" \/>\n<meta name=\"author\" content=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"23\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aelinkedlist-java%e3%81%aelinkedlist\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aelinkedlist-java%e3%81%aelinkedlist\/\",\"name\":\"Java\u306eLinkedList - Java\u306eLinkedList - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2022-10-22T13:00:36+00:00\",\"dateModified\":\"2025-07-31T14:18:15+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27\"},\"description\":\"Java\u306eLinkedList - Java\u306eLinkedList\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aelinkedlist-java%e3%81%aelinkedlist\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aelinkedlist-java%e3%81%aelinkedlist\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aelinkedlist-java%e3%81%aelinkedlist\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\u306eLinkedList &#8211; Java\u306eLinkedList\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27\",\"name\":\"\u82bd\u4f9d, \u96e8\u591c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"caption\":\"\u82bd\u4f9d, \u96e8\u591c\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aelinkedlist-java%e3%81%aelinkedlist\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Java\u306eLinkedList - Java\u306eLinkedList - Blog - Silicon Cloud","description":"Java\u306eLinkedList - Java\u306eLinkedList\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/java\u306elinkedlist-java\u306elinkedlist\/","og_locale":"ja_JP","og_type":"article","og_title":"Java\u306eLinkedList - Java\u306eLinkedList","og_description":"Java\u306eLinkedList - Java\u306eLinkedList\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/java\u306elinkedlist-java\u306elinkedlist\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-10-22T13:00:36+00:00","article_modified_time":"2025-07-31T14:18:15+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65648c19daa94e2bdf7bc4eb\/8-0.jpg"}],"author":"\u82bd\u4f9d, \u96e8\u591c","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u82bd\u4f9d, \u96e8\u591c","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"23\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aelinkedlist-java%e3%81%aelinkedlist\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aelinkedlist-java%e3%81%aelinkedlist\/","name":"Java\u306eLinkedList - Java\u306eLinkedList - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2022-10-22T13:00:36+00:00","dateModified":"2025-07-31T14:18:15+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27"},"description":"Java\u306eLinkedList - Java\u306eLinkedList\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aelinkedlist-java%e3%81%aelinkedlist\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aelinkedlist-java%e3%81%aelinkedlist\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aelinkedlist-java%e3%81%aelinkedlist\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Java\u306eLinkedList &#8211; Java\u306eLinkedList"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27","name":"\u82bd\u4f9d, \u96e8\u591c","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","caption":"\u82bd\u4f9d, \u96e8\u591c"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aelinkedlist-java%e3%81%aelinkedlist\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/401","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=401"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/401\/revisions"}],"predecessor-version":[{"id":40128,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/401\/revisions\/40128"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}