Skip to content

Tag Archives: java-list

Array: Array is a linear data structure that is the collection of similar data types.  Arrays are static data structures with fixed sizes.  Arrays are… Read More
Mockito is an open-source testing framework used for unit testing of Java applications. It plays a vital role in developing testable applications. Mockito is used… Read More
In this article, we are going to see how to iterate through a List. In Java, a List is an interface of the Collection framework.… Read More
A list is an ordered sequence of elements stored together to form a collection. A list can contain duplicate as well as null entries. A… Read More
The List interface allows storing the ordered collection. It is a child interface of Collection. It is an ordered collection of objects in which duplicate… Read More
Concatenating two lists means merging two lists into a single list. Consider the given lists: LIST 1LIST 2LIST AFTER CONCATENATION There are several methods to… Read More
Reversing a list means after reversing the list, the first element should be swapped with the last element, the second element should be swapped with… Read More
ArrayList is a part of the Collection framework and is present in java.util package. It provides us with dynamic arrays in Java. Though, it may… Read More
Lists in java allow us to maintain an ordered collection of objects. Duplicate elements as well as null elements can also be stored in a… Read More
TreeSet is an implementation of the SortedSet interface in Java that uses a Tree for storage. TreeSet can be created from List by passing the… Read More
The List Interface in Java represents an ordered collection or sequence. This Interface helps us control where to insert elements and also access elements through… Read More
Multiplying two corresponding elements implies multiplying the first element of the one list with the first element of another list and so on with the… Read More
The List interface provides a way to store the ordered collection. It is an ordered collection of objects in which duplicate values can be stored.… Read More
Given a List, find the largest element in it. There are multiple approaches to tackle this problem, such as iterating through the List or using… Read More
The Comparator interface in Java can be used to compare user-defined objects. The Comparator interface is present in java.util package. Binary search is a searching… Read More