In the video below, we take a closer look at the What is ArrayList? | ArrayList Introduction and Sample Programs | Java Collections Framework. Let's get started!
A Bit About Blockchain
This article is for anyone who is curious about blockchain but has no idea what it is exactly. The goal is to make you understand what is blockchain, which means that there are few simplifications done while writing this. If you understand what blockchain technology is by the end of this article, then my mission will be accomplished!
Tips: Do not ignore the images mentioned in this article for the best understanding of blockchain technology. Images are very important.
Performance Analysis of ArrayList and LinkedList in Java
ArrayList
and LinkedList
are frequently used classes in the Java collection framework. If you know only understand basic performance comparisons of ArrayList
and LinkedList
, but not the minor details of these two classes, then this article is for you.
"ArrayList
should be used where more search operations are required, andLinkedList
should be used where more insert and delete operation is needed."
ArrayList
uses the Array
data structure, and LinkedList uses the DoublyLinkedList
data structure. Here, we are going to discuss how the underlying data structure affects the performance of insert, search, and delete operation on ArrayList
and LinkedList
.
A Case Study of Implementing an Efficient Shuffling Stream/Spliterator in Java
Sorting a Stream instance is straightforward and involves just a single API method call — achieving the opposite is not that easy.
In this article, we'll see how to shuffle a Stream in Java both eagerly and lazily using Stream Collectors factories and custom Spliterators.
How to Delete Duplicates From an ArrayList of Type Pojo/DTO
Recently, in my current project, I got a requirement where I had to delete duplicates from anArrayList
of type Pojo. I did a lot of research and found all the examples referring to an ArrayList
of type String and where is easy to remove duplicates. However, the real world is always different!
Here is code to delete duplicates from an ArrayList
based on two fields Material Type (matnrType
) and Supplier (supplier).