Skip to content

Tag Archives: Java-List-Programs

Given a set (HashSet or TreeSet) of strings in Java, convert it into a list (ArrayList or LinkedList) of strings. In java, Set interface is… Read More
Both ArrayList and CopyOnWriteArray implement List interface. But There are lots of differences between ArrayList and CopyOnWriteArrayList: CopyOnWriteArrayList creates a Cloned copy of underlying ArrayList,… Read More
As know FTP is a reliable protocol used for transferring files over the Internet. Though it is not a secure protocol, and all the data… Read More
ArrayList is a part of collection framework and is present in java.util package. It provides us with dynamic arrays in Java. Though, it may be… Read More
Java 9 was released around march 2017 and In Java 9 there are some features are added in Java language and factory method for immutable… Read More
Prerequisites: File class Given a main directory/folder, list all the files from it, and if this directory has other nested sub-directories, list files from them.… Read More
Before proceeding further let us quickly revise the concept of the arrays and ArrayList quickly. So in java, we have seen arrays are linear data… Read More
Implementation of ArrayList is not synchronized by default. It means if a thread modifies it structurally and multiple threads access it concurrently, it must be… Read More
Following methods can be used for converting Array To ArrayList:    Method 1: Using Arrays.asList() method   Syntax: public static List asList(T... a) // Returns… Read More
ArrayList and Vectors both implement the List interface, and both use (dynamically resizable) arrays for their internal data structure, much like using an ordinary array. … Read More
java.util.Collections.swap() method is a java.util.Collections class method. It swaps elements at the specified positions in given list. // Swaps elements at positions "i" and "j"… Read More
ArrayList is a part of collection framework and is present in java.util package. It provides us with dynamic arrays in Java. Though, it may be… Read More
Let us discuss the concept of the arrays and ArrayList briefly in the header to incorporate the understanding in java programs later landing onto the… Read More

Start Your Coding Journey Now!