Explore the importance of unit testing for the hashCode() method in Java.
Baeldung Author
Diego Martin
Here's what I've written (so far):
Baeldung on Java
- All
- Java Dates (4)
- Java String (3)
- Jackson (3)
- Networking (2)
- Java Numbers (2)
- Java IO (2)
- Java Collections (2)
- Testing (1)
- Java Web (1)
- Java Array (1)
- JSON (1)
- Core Java (1)
Finding the Redirected URL of a URL in Java
Filed under Java Web
Learn how handling redirection correctly is essential for building robust web applications that interact with external resources.
Get a Path to a Resource in a Java JAR File
Filed under Java IO
Explore different methods to obtain the path to a resource within a Java JAR file.
Convert TemporalAccessor to LocalDate
Filed under Java Dates
Explore different options to convert a TemporalAccessor object to a LocalDate object in Java.
Include null Value in JSON Serialization
Filed under Jackson
Learn how to handle null values when converting Java objects to JSON.
When to Use Setter Methods or Constructors for Setting a Variable’s Value in Java
Filed under Core Java
Learn when to use setter methods or constructors for setting the value of a variable in Java.
Normalizing the EOL Character in Java
Filed under Java String
Explore different Java methods for normalizing EOL characters.
Check if a Given Time Lies Between Two Times Regardless of Date
Filed under Java Dates
Explore ways to determine if a particular time lies within the two times without considering dates.
Adding Elements to a Collection During Iteration
Filed under Java Collections
Explore several methods, including ListIterator (enhanced for looping with a copy) and Java 8 Streams, which allow you to add elements to a list during iteration in Java.
Obtaining the Last Path Segment of a URI in Java
Filed under Java String, Networking
Explore multiple Java methods, including the URI class, Path class, FilenameUtils, and regular expressions, providing diverse approaches to extract the last path segment from a URI.
Create JavaType From Class with Jackson
Filed under Jackson
Learn how to build instances of JavaType from Class objects with the help of the Jackson library.
Check if String is Base64 Encoded
Filed under Java String
Explore several methods of verifying if a string is Base64 encoded..
Normalize a URL in Java
Filed under Networking
Explore different techniques to normalize a URL in Java.
Calculating the Power of Any Number in Java Without Using Math pow() Method
Filed under Java Numbers
Explore various approaches to calculating the powеr of a numbеr in Java without rеlying on the Math.pow() mеthod.
Difference between ZoneOffset.UTC and ZoneId.of(“UTC”)
Filed under Java Dates
Explore the ZoneOffset.UTC and ZoneId.of(“UTC”) methods and their key differences and use cases.
Check if a Float Value is Equivalent to an Integer Value in Java
Filed under Java Numbers
Explore various approaches to check if a float value is equivalent to an integer value in Java.
Convert Joda-Time DateTime to Date and Vice Versa
Filed under Java Dates
Learn how to transform Joda-Time DateTime objects into standard Java Date ones and vice versa.
Check if List Contains at Least One Enum
Filed under Java Collections
Learn how to quickly check if List contains at least one enum value
Convert Byte Array to JSON and Vice Versa in Java
Filed under Java Array, JSON
Learn how to quickly convert a byte array to JSON and vicе vеrsa in Java.
Convert an OutputStream to a Byte Array in Java
Filed under Java IO
Learn how to read bytes that were already written to an OutputStream.
How to Convert JsonNode to ObjectNode
Filed under Jackson
A quick guide to converting JsonNode to ObjectNode in Jackson