<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Untitled Publication]]></title><description><![CDATA[Untitled Publication]]></description><link>https://subbu.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 31 Aug 2026 06:04:36 GMT</lastBuildDate><atom:link href="https://subbu.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Java Collections - LinkedList (In progress)]]></title><description><![CDATA[Linked List
1. introduction
LinkedList is a doubly linked list which implements the List and Queue Iterfaces. It is a part of Java's Collections framework.
2. Features

It maintains the insertion order
It can have duplicate and null values
It is not ...]]></description><link>https://subbu.hashnode.dev/java-collections-linkedlist-in-progress</link><guid isPermaLink="true">https://subbu.hashnode.dev/java-collections-linkedlist-in-progress</guid><category><![CDATA[Java]]></category><dc:creator><![CDATA[Ramgopal Bhat]]></dc:creator><pubDate>Fri, 28 Jun 2019 10:09:45 GMT</pubDate><content:encoded><![CDATA[<h1 id="linked-list">Linked List</h1>
<h2 id="1-introduction">1. introduction</h2>
<p><em><code>LinkedList</code></em> is a doubly linked list which implements the <em><code>List</code></em> and <em><code>Queue</code></em> Iterfaces. It is a part of Java&#39;s <em><code>Collections</code></em> framework.</p>
<h2 id="2-features">2. Features</h2>
<ul>
<li>It maintains the insertion order</li>
<li>It can have duplicate and <em><code>null</code></em> values</li>
<li>It is not synchronized, means it is not thread-safe</li>
<li>It&#39;s <em><code>Iterators</code></em> and <em><code>ListIterators</code></em> are fail-fast, which means after the iterator&#39;s creation, if the list is modified a <em><code>ConcurrentModificationException</code></em> is thrown</li>
</ul>
<p>Although LinkedList is not synchronized, we can get a synchronized version of it by calling the <em><code>Collections.synchronizedList</code></em> method.</p>
<pre><code class="lang-java">List list = Collections.synchronizedList(<span class="hljs-keyword">new</span> LinkedList(...));
</code></pre>
<h2 id="3-comparison-to-arraylist">3. Comparison to ArrayList</h2>
<p>Both ArrayList and LinkedList implements the List interface, However, they differ completely in the way how they store and retrieve the elements.</p>
<h3 id="3-1-structure">3.1 Structure</h3>
<p>An ArrayList is an index based data-structure backed by an Array. It provides random access to its elements with performance equal to O(1).</p>
]]></content:encoded></item></channel></rss>