Skip to content

Category Archives: Java Programs

ArrayList class is a resizable array, present in ‘java.util package’. The difference between a built-in array and an ArrayList in Java, is that the size… Read More
Vectors basically fall in legacy classes but now it is fully compatible with collections. Java has many built-in functions to perform different operations on collections… Read More
Using LinkedHashSet and TreeSet, duplicate elements are removed. Because the LinkedHashSet and TreeSet do not accept duplicate elements.  Example: Input : vector = [1, 2,… Read More
The LinkedHashMap is just like HashMap with an additional feature of maintaining an order of elements inserted into it. HashMap provided the advantage of quick… Read More
LinkedHashMap maintains insertion order. Convert LinkedHashMap into TreeMap and after that print keys of TreeMap which are sorted in nature.   Example: Input: linkedHashMap =… 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. The listIterator() method… Read More
Comparator is an interface that is used to rearrange the ArrayList in a sorted manner. Comparator is used to sort an ArrayList of User-defined objects.… Read More
Given a LinkedHashSet the task is to find the minimum and maximum element from this LinkedHashSet in Java. There are two ways to find the… Read More
To merge multiple PowerPoint Presentation files using Java. To achieve this use a Java Library called Apache POI. Apache POI is a project run by… Read More
The Java.util.LinkedHashSet.contains() method is used to check whether a specific element is present in the LinkedHashSet or not. So basically it is used to check… Read More
A circle is a simple shape consisting of all the points in the plane that are equidistant from a point known as the center of… Read More
Use the addAll() method to merge two LinkedHashSet objects or append elements of one LinkedHashSet object to another LinkedHashSet object. Comparing with the set, addAll()… Read More
Let’s see how to get unique values from ArrayList. Convert ArrayList to HashSet to insert duplicate values in ArrayList but on the other hand, HashSet… Read More
Ever wondered how you can make an ArrayList unique? Well, in this article we’ll be seeing how to prevent the addition of duplicates into our… Read More
To create an object in a PDF with Canvas using Java can be done by using a library called iText. iText is a Java library… Read More

Start Your Coding Journey Now!