Explore multiple ways to initialize a HashSet while it’s constructed.
Search Results for: const
Method Constraints with Bean Validation 3.0
An introduction to method constraints using Bean Validation 2.0.
Constructor Injection in Spring with Lombok
A quick and practical example of constructor injection with Lombok in Spring
Constructor Dependency Injection in Spring
Quick and practical intro to Constructor based injection with Spring.
Add an Aggregation to an Elasticsearch Query
Discover how to request data with aggregated information in Elasticsearch.
Check if Two Strings Are Permutations of Each Other in Java
Explore some algorithms for checking whether a string is a permutation of another string.
Introduction to JavaParser
A quick and practical guide to JavaParser.
Convert a Queue to a List
Learn various ways to convert Queue to List in Java.
Convert Jackson JsonNode to Typed Collection
Explore different methods of converting Jackson’s raw data type JsonNode into typed Java collections.
Using Reactor Mono.cache() for Memoization
In this tutorial, we learn about memoization and demonstrate how to use Mono.cache() from the Project Reactor.
OpenAPI Custom Generator
Learn the steps required to create a custom generator for the OpenAPI generator tool.
Save Child Objects Automatically Using JPA
Learn how to save child objects automatically with JPA.
Casting Maps to Complex Objects
Learn how to convert a Map to an Object or POJO in Java.
How to Implement Elvis Operator in Java 8
Implement the Elvis operator in Java 8 using the Optional class and ternary operator.
Mapping Enum to String Using MapStruct
A quick tutorial on using MapStruct to convert enums to strings.
How to Unit Test an ExecutorService Without Using Thread.sleep()
Learn how to unit test an ExecutorService instance without using the Thread.sleep() method.
Using MapStruct With Inheritance
Learn how to use the Mapstruct mappers with inherited Java bean classes.
Get JSON Content as Object Using MockMVC
Explore several ways to get JSON content as an object using MockMVC and Spring Boot.
Introduction to Java 22
Explore the latest Java release, Java 22, which is now in General Availability.
Convert 2D Array Into 1D Array
Learn how to convert a two-dimensional array into a one-dimensional, which is commonly known as flattening.