Sort Java HashMap by Value
Here in this example I will show you how to sort a HashMap by value. I will use comparator interface to sort the values in HashMap.
Here in this example I will show you how to sort a HashMap by value. I will use comparator interface to sort the values in HashMap.
This example will show you what is a pangram and how to check a string is a pangram in Java program. A string is a pangram if it…
In this example I am going to show you how to find all paths from root to leaf nodes in binary tree. So I am going to find…
Elements in ArrayList Here I am going to show you how to find common, uncommon, unique elements in two Lists or ArrayLists using Java program. In this program…
Unique elements by merging arrays In this tutorial, I will show you how to merge string values from two arrays and produce the final array with unique string…
In this tutorial you will find closest number from array to the given number. Given an array of sorted integers, find the closest value to the given number.…
Here we will create an example on how to check a given number is palindrome or not. We will also make the given number palindrome if it is…
Introduction In this example we will see how to find longest substring from a given string without repeating characters using Java programming language. A given string when broken…
Introduction In this example we will see how to shuffle an ArrayList using Java programming language. We will use shuffle() method from Collections class to shuffle the ArrayList.…
String with special characters In this tutorial you will see how to reverse a string without affecting special characters using Java programming language. You will also see in…