How to create Thread Safe Singleton using Bill Pugh Approach ? || Singleton Design Pattern

preview_player
Показать описание
#kkjavatutorials #DesignPatternInJava

About this Video:
Hello Friends,
In this video we will learn How to create Thread Safe Singleton using Bill Pugh Approach ?


Source code LINK:

Follow me on Social network:

KK JavaTutorials WebSite:

Subscribe KK JavaTutorails YouTube Channel:

Subscribe My Hindi Channel(KK HindiGyan):

Some Important Playlist link on KK JavaTutorials:

Spring Framework Tutorial:

Eclipse shortcuts :

Java 8 Features Tutorial(All In One):

JDBC Tutorial in depth[Must Watch]

Java 8 Stream APIs:

WebLogic Server Tutorials:

Spring Boot Tutorial(All In One):

Hibernate Tutorials:

Java 5 new features Tutorials

Java 7 Features tutorials:

Java multithreading for beginners:

Java Collections framework Tutorials:

OOPs concepts in java Tutorials:
Рекомендации по теме
Комментарии
Автор

you left me no choice but to subscribe :) Thank you for the great explanation!

EnglishinDetails
Автор

Hooray for Bill Pugh, and hooray for you for explaining this better than a couple of other places I looked at where I was still confused. I totally get it now!

jvsnyc
Автор

Thank you for the series, I find your tutorials to be the best. Thank you.

MrTwangstaable
Автор

Nice video but I am not clear about how bill Pugh singleton is thread-safe?

vineetmittal
Автор

You did not explain, why it is thread safe?

ashishupadhyay
Автор

A lot of people who are careful about their terminology avoid ever saying "static inner class". They will call what we use here for SingletonHolder as "static nested class". "Inner Class" as a term they will use only to mean a member inner class, defined without static keyword, local or anonymous inner class. While those are three different things, they all have in common that they are associated with an instance of the outer class. I did not always make this distinction, but other people I learn from or discuss things with (and some authors I read) are very careful about that. So "static nested class" -- not owned by or associated with an instance of the outer class, can exist without any instance of the Outer class even existing, and several types of Inner Class, which can have differences, but in each case are indeed associated with an instance of the Outer class and maintain a reference to it.

jvsnyc
Автор

Please tell why this approach is thread safe????

VivekSharma-zbno
Автор

I am not clear, How you are saying this is thread safe ?

bhaumiksathvara
visit shbcf.ru