How to Mock a Web Server Using WireMock in Your Java Applications
When you need to test an application that consumes a web API, you basically have two options: Use Testcontainers to…
Read article →
How to Reverse a String in Java
If you need to reverse the character order of a String, you can use StringBuilder to do that. Note that the following…
Read article →
How to Keep the Elements of a Map in the Same Order That They Were Inserted
Usually, Java developers instantiate Maps using HashMap as implementation. Did you know HashMap doesn’t keep the order…
Read article →
How to Find the Maximum Value from a Collection in Java
Here’s how to find the maximum value from a Collection in Java. If you have any questions, leave a comment or ask me…
Read article →
How to Split Strings in Java
Here’s how to split Strings in Java. If you have any questions, leave a comment or ask me on my social media. The post…
Read article →
How to Join Strings in Java
Here’s how to join Strings in Java. If you have any questions, leave a comment or ask me on my social media. The post…
Read article →
Never Pass a Double as Argument When Constructing BigDecimal Objects in Java
See what happens when you pass a double as argument when constructing BigDecimal objects in Java. If you have any…
Read article →
How to Create a Lazily Initialized Singleton in Java
Here’s how to create a lazily initialized singleton in Java. If you have any questions, leave a comment or ask me on…
Read article →