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
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