Learn how to compare two StringBuilder objects in Java releases before and after Java 11.
Also find me here:
Baeldung Author
Sam Gardner
I'm a UK based full stack developer with 8+ years of experience. I specialise in Java but enjoy working with frontend languages and libraries as well. I'm always keen to learn new things and pass on that knowledge to others.
Here's what I've written (so far):
Baeldung on Java
- All
- Testing (3)
- Java String (3)
- Java List (2)
- Java Concurrency (2)
- Java Collections (2)
- Jackson (2)
- Spring (1)
- Reactive (1)
- Persistence (1)
- Networking (1)
- Java Web (1)
- Java Streams (1)
- Java Numbers (1)
- Java Dates (1)
- Java (1)
- JSON (1)
- Core Java (1)
- Algorithms (1)
Truncate a Double to Two Decimal Places in Java
Filed under Java Numbers
Learn to truncate a double to two decimal places in Java.
Check if Letter Is Emoji With Java
Filed under Java String
Discover multiple Java methods for detecting emojis in a string.
Mock Same Method with Different Parameters
Filed under Testing
Learn how to mock a method in Java to receive different responses based on the parameters passed in.
How to Check if a Value Exists in a JSON Array for a Particular Key
Filed under JSON
Learn how to inspect a JSON array and check if it contains a particular key-value pair.
How to Get First Item From a Java Set
Filed under Java Collections
Learn how to get the first item from a Java Set.
Difference Between Future, CompletableFuture, and Rxjava’s Observable
Filed under Java Concurrency, Reactive
Discover the difference between Future, CompletableFuture, and Rxjava’s Observable.
How to Get Notified When a Task Completes in Java Executors
Filed under Java Concurrency
Learn several options for receiving notifications on the completion of a task depending on how you’re running it.
Setting Default Values to Null Fields in Jackson Mapping
Filed under Jackson
Explore three ways of dealing with missing or null values in JSON when parsing it with Jackson.