Home » Tag Archives: Singleton Pattern

Tag Archives: Singleton Pattern

Java Singleton Design Pattern Example

1. Introduction In this article, we would be focusing on one of the many Java design patterns – The Java Singleton Design pattern with the help of a real-life example. In a massive Java application developed for a large organization, often it ends up hard to oversee and comprehend the code. With a fluctuating profile of designers taking a shot ...

Read More »

Singleton Class in Java Design Pattern – Best Practices with Examples

In this post, we feature a comprehensive Tutorial on Singleton Class in Java. Design Patterns in Java are incredibly popular among the software developers. One of the most common interview questions is the Singleton Design Pattern. So in this tutorial, I’ll summarize the best practices which will help developers dodge general issues and develop better applications. 1. What are Design ...

Read More »

java.lang.NullPointerException Example – How to handle Java Null Pointer Exception

In this post, we feature a comprehensive example of java.lang.NullPointerException. In Java, a special null value can be assigned to an object’s reference and denotes that the object is currently pointing to an unknown piece of data. A NullPointerExceptionis thrown when an application is trying to use or access an object whose reference equals to null. The following cases throw that exception: Invoking a method from ...

Read More »