-
System Logger
Almost all Java developers are familiar with logging frameworks like Log4j and the facade SLF4J, but not the System.Logger that has been available since java 9. Let’s learn about the standard.
-
Java Thread Programming (Part 13)
What is the maximum number of worker threads we can put in a ThreadPool? Let’s find out today on Foojay’s amazing Java threading series!
-
Java Thread Programming (Part 12)
Let’s find out what are the ways to create ThreadPool using the Executor framework in java and use result-bearing tasks using Callable and Future
-
Java Thread Programming (Part 11)
Learn how to ask the executor framework at startup to provision threads for us and they will be reused as long as the application runs.
-
Java Thread Programming (Part 10)
Let’s learn about BlockingQueue, one of the essential concurrent collections available in the concurrent package in the JDK.
-
Compact Strings: Reclaim 25% of Java Heap Memory & Lower Your Cloud Bills
Did you know that you can save up to 25% of your heap memory and your Cloud bills without any effort? Well, it’s true.
Many exciting features have been added to the latest releases of Java recently and I’m going to cover one that is often overlooked in this article.
-
🚀 Demystifying JVM Memory Management
In this multi-part series, I aim to demystify the concepts behind memory management and take a deeper look at memory management in some of the modern programming languages, in particular Java, Kotlin, Scala, Groovy, and Clojure.
I hope the series would give you some insights into what is happening under the hood of these languages in terms of memory management.
In this chapter, we will look at the memory management of the Java Virtual Machine (JVM) used by languages like Java, Kotlin, Scala, Clojure, Groovy, and so on.
-
Much Ado About Nothing in Java
Occasionally something in Java pops up that I thought I knew about, but it turns out I didn’t appreciate all the subtle details.
This was recently the case for “nul”. Before I started using Java, the main programming language I used was C. This was great for things like operating systems and device drivers because it uses explicit pointers. References to data are through a numerical address that can be manipulated if required.
Although null might seem like a simple, straightforward concept, there are some edge cases that make its use require a little more thought. I hope this provides you with a better understanding of nothing (null).
-
Migrating Browser-Based Java Applets to IcedTea-Web using JNLP
Let’s use a 20 year old JAR, once created for a Java Applet to be run in the Java 1.1 Browser Plugin… and run it on JDK 11!
It now runs outside of any Web Browser and without modifying its decades-old JAR. The Applet was once created and offered to browse through all raw color images uploaded by the Mars Pathfinder Lander which settled down on the planet on July 4th, 1997.
-
Avoiding NullPointerException
The terrible NullPointerException (NPE for short) is the most frequent Java exception occurring in production, according to a 2016 study. In this article we’ll explore the main techniques to fight it: the self-validating model and the Optional wrapper.
You should consider upgrading your entity model to either reject a null via self-validation or present the nullable field via a getter that returns Optional. The effort of changing the getters of the core entities in your app is considerable, but along the way, you may find many dormant NPEs.