I was writing about “Unified JVM Logging” feature which is proposed in Java 9. Then I found it necessary to first share the JVM Flags and what they do. There are thousands of JVM flags out of which we rarely
Process API Updates Java 9 has come with the changes which will let you fetch the pid of a process. Following code shows how to get a pid with Java 9 getPid function internally call getProcessId0 with process’s handle to
In my previous article, we saw how singleton can be created. But there can be some scenarios where serialization and de-serialization of singleton object is required and that can create multiple objects of a singleton class. This can be prevented if
Java 9 is expected in early 2016. Its always good to know upcoming features in advance so that we will ready to take advantage as soon as they are available. Full list of features targeted in this release can be found
Lazy Initialization is a way of improving performance of application. In lazy initialization objects are not initialized until they are needed. This saves the cost of creating objects and wasting memory until they are actually needed. Proxy Objects in Hibernate
Java Memory Model The Java memory model specifies how and when different threads can see values written to shared variables by other threads, and how to synchronize access to shared variables when necessary. Java memory model which was revised in Java
I was looking for a good practical\real example of Livelock and I came across a blog of “Richard”. He has shown very good examples of livelock, deadlock and starvation. I was more interested to understand livelock example. Here is the
JUnit is used for unit testing of Java applications. JUnit and TestNG are two popular unit testing frameworks. In this tutorial I will explore JUnit only. There are two popular version of JUnit – JUnit 3 and JUnit 4. Below table