Java – How to Sort String List by its length ?
In this article, we will discuss how to sort String List by its length in Ascending-order and Descending-order Sorting String List by its length: Using Read More
In this article, we will discuss how to sort String List by its length in Ascending-order and Descending-order Sorting String List by its length: Using Read More
In this article, we will discuss how to sort String[] Arrays by its length in Ascending-order and Descending-order Sorting String[] Arrays by its length: Using Read More
In this article, we will discuss how to find third shortest String in an Arrays and List 1. Finding Third Shortest String in an Arrays: We will follow below 2 Read More
In this article, we will discuss how to find third longest String in an Arrays and List 1. Finding Third Longest String in an Arrays: We will follow below 2 Read More
In this article, we will discuss how to convert a modifiable Collection into an unmodifiable Collection using Collections.unmodifiableCollection(); method 1. Collection implemented classes: Classes that implement directly or via Collection are, ArrayList LinkedList Read More
In this article, we will discuss how to split a String using different delimiters and collect to any Collection or List or Set Split a Read More
In this article, we will discuss how to convert Stream into a TreeSet in Java 1.8 version using Stream API. TreeSet doesn’t allow duplicates but Read More
In this article, we will discuss different ways to sort a Map entries (key-value pairs) by its Key Before proceeding with this sorting examples understand Read More
In this article, we will discuss how to sort TreeSet elements in descending order using Java 8 Stream API Before proceeding with this sorting examples understand Read More
In this article, we will discuss how to sort TreeSet elements in descending order using Comparator interface 1. Comparator interface Compares its two arguments for order Read More
In this article, we will discuss how to sort LinkedHashSet elements in ascending & descending order using Java 8 Before proceeding with this sorting examples understand Read More
In this article, we will discuss how to remove duplicate element/objects from LinkedList with examples using different approaches Also read How to remove duplicates from Read More
In this article, we will discuss how to sort HashSet in Java 8. Already, in one of the earlier article we discussed about HashSet Sorting in Read More
In this article, we will discuss various ways to iterate through TreeSet – 3 ways Various ways to iterate through TreeSet: Enhanced for-loop introduced in Java 1.5 version Iterating Read More
In this article, we will discuss how to convert Ordered ArrayList into Sorted TreeSet in Java We can sort ArrayList in both ascending and descending Read More
In this article, we will discuss how to sort HashSet contents in ascending as well as descending order Sorting HashSet in Ascending and Descending order: Read More
In this article, we will discuss how to sort contents of LinkedList in ascending order containing only unique elements 1. Approach : Convert LinkedList into Read More
In this article, we will discuss how to get synchronized version of Collection using Collections class’s utility synchronizedCollection() method Q) How to make Synchronized Collection Read More
In this article, we will compare important implementation classes of Set i.e.; HashSet v/s LinkedHashSet v/s TreeSet So let’s us discuss in tabular format; 1. Read More
In this article, we will discuss TreeSet class – the implementation class for NavigableSet interface in detail 1. Key points about TreeSet: TreeSet doesn’t allow duplicate Read More