What is Singleton Pattern in Java - How to achieve this?

preview_player
Показать описание
In this video, I have explained What is Singleton Pattern in Java - How to achieve this?

The Singleton pattern in Java is a design pattern that restricts the instantiation of a class to one "single" instance. This is useful when exactly one object is needed to coordinate actions across the system. The Singleton pattern ensures that a class has only one instance and provides a global point of access to that instance.

Schedule a meeting in case of any queries/guidance/counselling:

~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:

Follow me on my Facebook Page:

Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:

Naveen AutomationLabs Paid Courses:
GIT Hub Course:

Java & Selenium:

Java & API +POSTMAN + RestAssured + HttpClient:
Рекомендации по теме
Комментарии
Автор

I am impressed the way of explanation . Thank You so much . Carry on

soumyaranjandas
Автор

Please continue this series with all the design patterns in Java.

bihari
Автор

Excited for this series with all the design patterns for Automation testing .Getting lots of interview questions regarding design pattern .Thanks Naveen for doing this for community .

ranjanjyoti
Автор

Thank you for the video! I am migrating a shell script to Java, and I want to implement logging. If I want to implement, some custom functions for the Logger class, does it make sense to make a CustomLogger using a Singleton design pattern?

zephyrdark
Автор

Naveen, why do we need two null check for the browser? Why isn't one null check enough?

xoda
Автор

Thanks Naveen if we go for eager initialisation instead of lazy ie creating instance before access. We will not require synchronised block correct me if wrong

yashsaxena
Автор

Thanks Naveen for this video. Could you please create same for Playwright with Java?

prateekgupta
Автор

Hi Naveen, can you make a video on Collectors.grouping by questions ?

niloychakravorty
Автор

Honestly speaking if you would have made the video before about it I would have crack EPAM for remote location.... : (

bihari
Автор

Sir i tried to connect with you on LinkedIn and WhatsApp which you provided on your website regarding mock interview i really want to take mock interview please reply if it's possible for you to schedule mock or not sir

ambika-sk
Автор

Naveen can you please explain SOLID principles also

mahalasakini
Автор

Very well ❤️‍🩹 explained.. thanks Naveen!!!

kailashpathak
Автор

How you are writing with mouse on eclipse directly?

nityaranjan
Автор

Why do we need to create object only single time ? whats the real time use case at framework level?

neha
Автор

what is Browser.class can you tell what it will do?

dchenamoni