Comparing Two HashMaps in Java

2021 VietMX 0

1. Overview In this tutorial, we’re going to explore different ways to compare two HashMaps in Java. We’ll discuss multiple ways to check if two HashMaps are similar. We’ll also […]

Sort a HashMap in Java

2021 VietMX 0

1. Introduction In this quick tutorial, we’ll learn how to sort a HashMap in Java. More specifically, we’ll look at sorting HashMap entries by their key or value using: TreeMap […]

Merging Two Maps with Java 8

2021 VietMX 0

1. Introduction In this quick tutorial, we’ll demonstrate how to merge two maps using the Java 8 capabilities. To be more specific, we’ll examine different merging scenarios […]

A Guide to Java HashMap

2021 VietMX 0

1. Overview In this article, we’ll see how to use HashMap in Java, and we’ll look at how it works internally. A class very similar to HashMap is Hashtable. Please […]

A Guide to LinkedHashMap in Java

2021 VietMX 0

1. Overview In this article, we are going to explore the internal implementation of LinkedHashMap class. LinkedHashMap is a common implementation of Map interface. This particular implementation is a subclass of HashMap and […]

Guide to WeakHashMap in Java

2021 VietMX 0

1. Overview In this article, we will be looking at a WeakHashMap from the java.util package. In order to understand the data structure, we’ll use it here to roll […]

Java TreeMap vs HashMap

2021 VietMX 0

1. Introduction In this article, we’re going to compare two Map implementations: TreeMap and HashMap. Both implementations form an integral part of the Java Collections Framework and store data as key-value pairs. 2. Differences […]

A Guide to TreeMap in Java

2021 VietMX 0

1. Overview In this article, we are going to explore TreeMap implementation of Map interface from Java Collections Framework(JCF). TreeMap is a map implementation that keeps its entries sorted according […]

A Guide to Java HashMap

2021 VietMX 0

1. Overview In this article, we’ll see how to use HashMap in Java, and we’ll look at how it works internally. A class very similar to HashMap is Hashtable. Please […]

A Guide to HashSet in Java

2021 VietMX 0

1. Overview In this article, we’ll dive into HashSet. It’s one of the most popular Set implementations as well as an integral part of the Java Collections Framework. 2. […]

A Guide to TreeSet in Java

2021 VietMX 0

1. Overview In this article, we’ll have a look at an integral part of the Java Collections Framework and one of the most popular Set implementations – the TreeSet. […]