1. Introduction This article is the 3rd article in the Collectors series. Read about the Collector interface. Read about Collectors class’s methods like toList, toUnmodifiableList, […]
Learn Collectors: toList, toSet, toMap, toConcurrentMap, toCollection and to unmodifiable collection with 25 examples
1. Introduction Collectors is a final class with a private constructor. I am using Azul’s OpenJDK version azul-14.0.1. It has 44 static methods are used […]
Complete Guide to Collector Interface
1. Introduction Collector is a mutable reduction operation. After processing the data using Stream, we need a result of this processing. We use this operation […]
Complete Guide to HashMap.
1. Introduction In this article, we will discuss HashMap class and its methods. If you are looking for Map interface’s enhancements of Java 8, 9, […]
Complete Guide to java.util.Objects class including Java 9 enhancements
1. Introduction java.util.Objects class is part of java.util package. Object class is a final class with a private constructor. Objects class comprises several static utility […]
How to serialize and deserialize a ArrayList?
1. Introduction This article is final article on Complete Guide to ArrayList series. In this article we will discuss how to serialize and deserialize an […]
ArrayList : isEmpty(), size(), clear(), equals(), hashCode() and trimToSize()
1. Introduction This article is part of Complete Guide to ArrayList series. In this article, we will look at the remaining methods of List interface. […]
How to check if elements exists in ArrayList?
1. Introductions In previous articles, we saw how to create an ArrayList, how to add elements into ArrayList, and how to remove elements from ArrayList. […]
How to remove elements from ArrayList?
1. Introduction This article is part of Complete Guide to ArrayList series. In previous articles of ArrayList, we saw how to create ArrayList and how […]
How to add and set and get elements in an ArrayList with examples?
1. Introduction This article is part of Complete Guide to ArrayList series. In this article, we will discuss how to add/set/get elements in/from the ArrayList […]
Learn 3 different ArrayList class constructors with examples.
1. Introduction This article is part of the ArrayList class series. In this article, we will look at 3 different constructors provided in the ArrayList […]
Dependency Injection in Spring
1. Overview In this article, we will discuss 3 different dependency injection strategy provided in Spring. 2. Content Dependency Injection : Dependency means one object […]
Replacing nested if conditions in Object Oriented Way
1. Introduction In this article, I will discuss how to refactor the nested if conditions. Writing nested if conditions opens a whole slew of problems […]
Map Interface Enhancements from Java 8 to Java 10
1. Introduction In this article, we will explore the methods that were added to the Map interface since Java 8 release. No new methods were […]
Injecting Collections in Spring
1. Introduction In this article we will discuss how to inject Collections using Spring. 2. Content If a Collection is publicly available then usually in […]
Set Interface Enhancements from Java 8 to Java 10
1. Introduction In the previous article, we saw the new additions in Set interface, Collection interface and Map.Entry since Java 8 release. In this article, […]
Injecting HTTP Headers in Spring Rest Controller
Watch the video about this article at YouTube or use link https://www.youtube.com/watch?v=sh2rvIZ7vx0 1. Introduction In this article, I will discuss how to inject the request […]
Injecting Prototype Bean in Singleton Bean
1. Introduction In this article, I will go through a few different ways to solve an interesting dependency injection problem that can arise while using […]
Map.Entry Interface Enhancements : What’s new in Java 8 to Java 10
1. Introduction In this article we will discuss 4 methods added in the Entry interface. Entry interface is a nested interface in java.util.Map interface. Map […]
Collection Interface Enhancements : What’s new in Java 8 to Java 11
1. Introduction In this article we will see 5 different methods that were added in the Collection interface since Java 8. We will discuss methods […]