Ever wondered why some parts of your Java code using collections mysteriously crash? It all boils down to how those collections handle null values! Learn the hidden rules behind ArrayLists, HashSets, TreeMaps, HashMaps, and null values.
Also find me here:
Baeldung Author
Sachin Raverkar
Sachin is a Java enthusiast with over two decades of product development expertise. He enjoys architecting and delivering SAAS products as well as sharing expertise with people all over the world.
Here's what I've written (so far):
Baeldung on Java
- All
- Java Collections (2)
- Java (2)
- Spring Boot (1)
- Java String (1)
- Java Streams (1)
- Java List (1)
- Java Dates (1)
Introduction to Apache Commons Validator
Filed under Java
Learn how to validate dates, numbers, currencies, and more with built-in validators, saving you time and ensuring consistent validation across your application.
Ensuring Type Safety With Collections.checkedXXX() in Java
Filed under Java Collections
Explore the Collections.checkedXXX() methods and understand how they can help catch type mismatches early, prevent bugs, and enhance code maintainability.
Returning Errors Using ProblemDetail in Spring Boot
Filed under Spring Boot
The article dives into using ProblemDetail in Spring Boot to handle errors in a cleaner and more standardized way, especially for REST APIs and reactive streams.
Guide to Finding Min and Max by Group Using Stream API
Filed under Java Streams
Learn how to group elements by value and find their minimum and maximum values in each group.
Map LocalDateTime to Instant in MapStruct
Filed under Java Dates
Learn how to map LocalDateTime to Instant and vice versa using MapStruct.
Mapping Enum to String Using MapStruct
Filed under Java String
A quick tutorial on using MapStruct to convert enums to strings.
Mapping Enum With MapStruct
Filed under Java
Learn to map between enum types and other data types like strings or integers using MapStruct’s @ValueMapping