Usually, Java developers instantiate Maps using HashMap as implementation. Did you know HashMap doesn’t keep the order of insertion? Look at the following example: If we run the example above, the following output will be printed: So, if you want to...
Here’s how to find the maximum value from a Collection in Java. If you have any questions, leave a comment or ask me on my social media. The post How to Find the Maximum Value from a Collection in Java appeared first on The Great API.
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.
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.
See what happens when you pass a double as argument when constructing BigDecimal objects in Java. If you have any questions, leave a comment or ask me on my social media. The post Never Pass a Double as Argument When Constructing BigDecimal Objects i...
Here’s how to create a lazily initialized singleton in Java. If you have any questions, leave a comment or ask me on my social media. The post How to Create a Lazily Initialized Singleton in Java appeared first on The Great API.
Here’s a talk that I gave at the Jacksonville Java User Group that shows you how you can increase the quality of your code. You’ll see code enhancement examples with key features that came from Java 9 to 17. The post JDK 17 Is Out! See How to Improve...
Here’s how to use Callable and Future to run parallel tasks in Java. If you have any questions, leave a comment or ask me on my social media. The post How to Use Callable and Future to Run Tasks in Parallel appeared first on The Great API.
Here’s how to sort a Map by its values in Java. If you have any questions, leave a comment or ask me on my social media. The post How to Sort a Map by Its Values in Java appeared first on The Great API.
Here’s how to use an in-memory file system in your tests with Google’s Jimfs. If you have any questions, leave a comment or ask me on my social media. The post How to Use an In-memory File System in Your Tests With Google’s Jimfs appeared first on Th...