Skip to content

Tag Archives: java-map

JSON is an open standard file format, and easier data interchange format helpful for humans to transmit data. Most of the apps display JSON data… Read More
Map Interface is present in Java.util package, which provides mainly three methods KeySet(),entrySet() and values(). These methods are used to retrieve the keys of the… Read More
The Hashtable class implements a hash table, which maps keys to values. Any non-null object can be used as a key or as a value.… Read More
Map Interface is present in Java.util package, which provides mainly three methods KeySet(),entrySet() and values(). These methods are used to retrieve the keys of the… Read More
Map Interface is present in Java.util package, which provides mainly three methods KeySet(),entrySet() and values(). These methods are used to retrieve the keys of the… Read More
The Hashtable class implements a hash table, which maps keys to values. Any non-null object can be used as a key or as a value.… Read More
HashMap and Hashtable are used to store data in key and value form using a hashing technique to store unique keys. To copy Map content… Read More
List interface in Java is a sub-interface of the Java collections interface. It contains the index-based methods to insert, update, delete, and search the elements.… Read More
Map Values() method returns the Collection view of the values contained in this map. The collection is backed by the map, so changes to the… Read More
Map size() method in Java is used to get the total number entries i.e, key-value pair. So this method is useful when you want total… Read More
Introduced in Java 8, the Stream API is used to process collections of objects. A stream is a sequence of objects that supports various methods… Read More
Given an array arr of size N, the task is to count the number of indices j (j<i) such that a[i] divides a[j], for all… Read More
Given an array arr, the task is to find the minimum distance between any two same elements in the array. If no such element is… Read More
Given a map in Java, the task is to find out the entry in this map with the highest key. Examples: Input: Map = {ABC… Read More
Given a map in Java, the task is to find out the entry in this map with the highest value. Examples: Input: Map = {ABC… Read More