Singleton pattern in Java | Design Patterns tutorial 01 | Java9s.com

preview_player
Показать описание
Singleton pattern which is one of the simple but important among the design patterns. In this design patterns tutorial series, i have explained the singleton pattern with a good example. I have also mentioned about the Example which can deal with the Thread related synchronization problems which was proposed by Bill Pugh.

Download the singleton pattern example from the link below:

Complete Generics Tutorials playlist

Complete Java Beginners Tutorials:

Multithreading in Java tutorial:

Spring 3 MVC Framework tutorials:

Spring Framework Tutorials:

Design Patterns Tutorials:
Рекомендации по теме
Комментарии
Автор

Best Exonation ever. pls upload video on system desing concepts such as designing class diagram, object relation and overall architecture of uber, whatsppp etc.

ChandraShekhar-bycd
Автор

Very good. Simple and clear. I've watched other videos, but yours is the best.

liedebunker
Автор

Thank you. Very well explained. Like the last part about solving multithreading related issues. Subscribed

absutube
Автор

Thank you so much for nice and easy way to explaing.

manasrout
Автор

Hello Sir, Please also mention ways to break the Singleton Pattern with some practical examples.

snitin
Автор

Question. The last change seems to be creating a new instance for each call. The loop in main would create more than one instance? Static or not, you are newing up for each iteration of the loop. Correct?

johnmadsen
Автор

How does creating the instance in an inner class solve the problem during multithreading?

neerajagandla
Автор

Could you please upload videos about Design principles like Open-Close, Dependency inversion.... etc ?

venkatramana
Автор

The flight tracking example you gave is understandable. But can you let me know why do we need to make the Satellite class singleton if we can make all its data static? Can you give an example where using singleton is the only option?

tamannalekhwani
Автор

We do we need the helper class? Can't we just have an member variable in Satelite class like `private static final Satelite _instance = new Satelite();`

ksaittis