Creating More Intuitive Java APIs With Optional

Creating intuitive APIs is a very important skill for you to reduce the chances of bugs and make your software more maintainable. When you don’t create intuitive APIs, your code becomes error prone and the developers (including you) may misuse an API...

Read More
Nov 03, 2021
How to Use Pattern Matching for instanceof From JDK16

The new LTS version (version 17) of Java was released in September. And since the previous LTS (version 11), many cool features were added. One of the coolest ones is “Pattern Matching for instanceof“. Until Java 15, when we checked whether an object...

Read More
Oct 13, 2021
How to Map and Reduce Items From a List in Java

Mapping items from a List means that each item from that List will be converted into another object. Reducing items from a List means that all items from that List will be combined into a single object, which doesn’t necessarily have the same type as...

Read More
Oct 06, 2021
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 code prints: Java is great! If you have any questions, leave a comment or send me a message on my social media. The post How to Reve...

Read More
Sep 28, 2021
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 How to Split Strings in Java appeared first on The Great API.

Read More
Sep 22, 2021
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 How to Join Strings in Java appeared first on The Great API.

Read More
Sep 20, 2021