🔥Singleton Design Pattern in Detail | Multi-Threaded Environments | Hindi

  Рет қаралды 109,483

Learn Code With Durgesh

Learn Code With Durgesh

Күн бұрын

Пікірлер: 118
@naveedzaman3533
@naveedzaman3533 11 ай бұрын
Hi Durgesh, After a considerable amount of time, I've finally found some valuable resources to study design patterns. Thank you very much. I'm from Lahore, Pakistan. Regards, Naveed Zaman
@SARTHAK-IO
@SARTHAK-IO Жыл бұрын
Bhai bhai 😂🔥🔥🔥🔥, literally itne depth mei aaj tk kisi ne nh padhaya ,
@ankukulhade786
@ankukulhade786 Жыл бұрын
i have seen many video of singleton but never seen such video. Thanks for sharing.
@adityabhadoriya3191
@adityabhadoriya3191 Жыл бұрын
It's good that you are maintaining a playlist general questions are asked in project interview that your project is based on which design pattern or what approach we need to use to accomplish this task which design pattern. etc..,
@susmithanadar4034
@susmithanadar4034 7 ай бұрын
You make coding feel so easy.
@hrds479
@hrds479 9 ай бұрын
glowing fire while typing nice it look amazing
@Kahanikduniya-q6i
@Kahanikduniya-q6i Жыл бұрын
Thank you sir , itna ache se to paid course me bhi nahi sikha hoga kisi ne ....:)
@Ritesh00777
@Ritesh00777 4 ай бұрын
Thanks durgesh Finally I found a good and simple explanation on design patterns it's easy to understand and adaptable
@souravdas6918
@souravdas6918 Жыл бұрын
bhai thank u.. jalebi samosa example se single ton pattern ka doubt clear ho gaya ....
@ishaansharma8366
@ishaansharma8366 5 ай бұрын
Salute to you sir jee. My every single doubt is cleared for interview preparations. ❤❤❤❤❤
@raghavmanish24
@raghavmanish24 Ай бұрын
ya it's so easy explanation ....thanku sir
@SumitAnnapurne-o7b
@SumitAnnapurne-o7b 8 ай бұрын
really very informative
@photolab6712
@photolab6712 11 ай бұрын
bohoti accha explanation and video..
@LuckyMarathon-vr4yl
@LuckyMarathon-vr4yl 5 ай бұрын
More than perfect ... very good explanation
@sudiptakhotel1204
@sudiptakhotel1204 Ай бұрын
What an explanation , best
@susmithanadar4034
@susmithanadar4034 7 ай бұрын
Thank you for helping me prepare for my interviews. Your videos really matter to people like me.
@tanulakhwani
@tanulakhwani 7 ай бұрын
Very easily understandable. Thanks
@sgsenginier
@sgsenginier 4 ай бұрын
Awesome🙂Thanks.🙏
@mdtauseef5482
@mdtauseef5482 4 ай бұрын
Gazab bhai 💥💥💥
@shubhambhardwaj8894
@shubhambhardwaj8894 Жыл бұрын
Sir apke examples se toh muh me pani aa jata hai🤤😋
@abhinavsaxena3418
@abhinavsaxena3418 Ай бұрын
Bhai aapne Eager way me private constructor kyu nhi bnaya?......Without uske hum kitne bhi object pna skte hain pizza ke. Please clearify these small mistakes can ruin our interviews. btw Awesome work , Thank you.
@saurcandy1600
@saurcandy1600 5 ай бұрын
Bro - bht bhala manus ho aap.
@Anil-mt2bm
@Anil-mt2bm 2 ай бұрын
really helpful thank you sir ji
@the_shridhar
@the_shridhar Жыл бұрын
Next level sir ji 🔥🔥🔥
@strangemate
@strangemate 9 ай бұрын
Wow, must say gajab and super simple explanation..bahut badiya..may God bless you buddy
@YadavAjay-f6u
@YadavAjay-f6u 6 ай бұрын
Good Tutorial Video. Thanks from Kathamndu , Nepal
@shrabonisinha
@shrabonisinha 5 ай бұрын
Thank you so much. Outstanding explanation
@heramsharma1747
@heramsharma1747 Жыл бұрын
Very nice video As per expectation 🎉😊
@yashin8902
@yashin8902 Жыл бұрын
Thank you so much for making these type of videos that makes complex topics very simple and easy.
@ashishSinghSengar17
@ashishSinghSengar17 9 ай бұрын
Thank you for providing such quality content
@shadan948
@shadan948 Жыл бұрын
Maza aaya sir 😘 Aur ye maza pure software engineer ko milna chahiye 🤣
@crazygirlsmruti3109
@crazygirlsmruti3109 Жыл бұрын
Thank you....... very good explanation
@GauravKumar-pw8xr
@GauravKumar-pw8xr Жыл бұрын
Hello sir I like your videos a lot and admire your hardwork. Please please make a series on multi threading and concurrency.
@GitanjaliKumari-v9h
@GitanjaliKumari-v9h 5 ай бұрын
thanks , nice explanation
@DevendraKumawat-k7w
@DevendraKumawat-k7w 10 ай бұрын
It's very good video ❤
@rameshkumar-zk3or
@rameshkumar-zk3or Жыл бұрын
Very informative.
@AtulSingh-k3c
@AtulSingh-k3c Ай бұрын
logical teaching technique, Sir, thank you. I am Atul singh from Lucknow
@LawrenceGates-zl9zp
@LawrenceGates-zl9zp Жыл бұрын
Waris Waheed from Pakistan, Love your content
@Mrsakina570
@Mrsakina570 9 ай бұрын
ur just great man
@pawanpathak6576
@pawanpathak6576 Жыл бұрын
Hi Durgesh, Thank you very much for your contribution for making us understand such complex technicality in such a layman way. Please keep doing the good work. However I will like to bring this in your notice that in Eager Initialization of Singleton as We have not created private constructor of class, We can create the object of the class anywhere else. And this might lead us to develop faulty singleton. I was going through coding practice of your code and I tried to create object of Jalebi class in Example class which allowed me to create 2 objects with new keyword and when I checked the hash code of these newly created objects, It was different. I might be wrong, Please help me.
@MayureshDiaries
@MayureshDiaries 2 ай бұрын
Just a quick question. In Jalebi class we also have to make constructor private right?
@varaprasadpamarthi2649
@varaprasadpamarthi2649 Жыл бұрын
super explanation video is length but worth watching , thanks for your effort😊
@dailyyogaathome
@dailyyogaathome 10 ай бұрын
Well explained Durgesh! Please create these videos for Python if possible!
@Abhishek-df5tf
@Abhishek-df5tf 5 ай бұрын
Why arr used dark theme
@unemployedcse3514
@unemployedcse3514 Жыл бұрын
Awesome 😍
@varnitajaiswal8569
@varnitajaiswal8569 Жыл бұрын
very informative video
@gangadeviksalimath3690
@gangadeviksalimath3690 Жыл бұрын
Sir which software u are using
@CodewithAIYoutubeChannel
@CodewithAIYoutubeChannel 10 ай бұрын
#Radhe Radhe vrindavan se. H G❤
@prajjawalkumarpatel9360
@prajjawalkumarpatel9360 Жыл бұрын
saare design pattern par video daliye
@khizerhussain7613
@khizerhussain7613 3 ай бұрын
bestvideo brother
@dProfessor_
@dProfessor_ Жыл бұрын
got it sir thanks
@devkumar9889
@devkumar9889 6 ай бұрын
We can also use Static data and members instead of singleton ?
@callmeghostgamer
@callmeghostgamer Жыл бұрын
Apka content bahut acha hota hai please change your keyboard 😂 bahut typo karta hai apka keyboard 😅
@motivations2218
@motivations2218 8 ай бұрын
My name is Umair and I am From Pakistan Sir. Great Sir
@Rohit-g3x6k
@Rohit-g3x6k Жыл бұрын
Rohit Kumar from Jharkhand
@GautamKumar-yv7li
@GautamKumar-yv7li Жыл бұрын
please make videos for data structures and algorithms
@avrajitsikder9646
@avrajitsikder9646 8 ай бұрын
Just awwwsomeeeee💥💥💥💥,very informative.
@strangemate
@strangemate 9 ай бұрын
Hi Durgesh, what is the reason of providing the class literal inside the synchronize block?
@rupeshpatil6005
@rupeshpatil6005 Жыл бұрын
ThankYou Sirji Sir Please make This Design PATTERN PlayList we Want More Videos
@sukrit_shukla
@sukrit_shukla 3 ай бұрын
Hi @Durgesh, Using synchronized block will not work in distributed environment. We'll have to use enum for handling singleton creation in distributed environment.
@sameerkadgaye2048
@sameerkadgaye2048 Жыл бұрын
Thank you sir
@djj.-gq4dl
@djj.-gq4dl Жыл бұрын
Man only 1 Samosa for all? that's evil haha! i need atleast 5 instances of samosa lol. Love ur video. I am from California! Can you also share what does @Singleton does?
@Javawala-i6z
@Javawala-i6z Жыл бұрын
Great sir
@v2factsand327
@v2factsand327 Жыл бұрын
Awesome
@LowProfie_
@LowProfie_ Жыл бұрын
Sir, please keep the background in light color. 😢 Some students may have problem with reading dark theme. It's not properly visible. We have to keep brightness at Max. 😢
@sarahsheikh17
@sarahsheikh17 8 ай бұрын
Wah! Ek video me 6 mahine ki semester ki parhai ho geya.
@vinaychauhan7627
@vinaychauhan7627 10 ай бұрын
Hi, I do have a question, Why are we using extra if condition and not making single if condition as synchronized block?
@ommehta4501
@ommehta4501 Жыл бұрын
very good please make the live project using these design patterns
@RiteshSingh-q4b
@RiteshSingh-q4b 4 ай бұрын
Hi Durgesh, why you did not pass private constructor in eager way of creating singleton?
@ketank6864
@ketank6864 Жыл бұрын
awsome!
@AnuragKumar-kf4ic
@AnuragKumar-kf4ic Жыл бұрын
Can you give example where to use lazy and where to use eager?
@shubhamsinghal7188
@shubhamsinghal7188 10 ай бұрын
Sir, Poha bhi banado toh pura nashta hojaye 😍😍
@shpreetamsingh1263
@shpreetamsingh1263 Жыл бұрын
Hi first time connects successful with db by class object but after some time when I am calling again class object then db connection get time out. Any suggestions ?
@aparajitas4303
@aparajitas4303 Жыл бұрын
Hello from Virginia.
@rohitjaiswal946
@rohitjaiswal946 8 ай бұрын
Why we used if(Samosa==null) before and after the synchronized block, what is the issue if we use it only after the synchronized only?
@deepakkarmaDK
@deepakkarmaDK 10 ай бұрын
Could please create series using c# ? Synchronised keyword not in c# .. so how it will work in c#
@amitsaonerkar6640
@amitsaonerkar6640 Жыл бұрын
Is it not like the static variable samosa in class when accessed by different threads can get its false state. For e.g t1 enters get it null and create it and then t2 enter but its updated state ie samosa is not null is not reflected for t2 then it can also lead to its creation . Basically keeping it volatile may solve the problem.
@palkherohit1
@palkherohit1 10 ай бұрын
have one question, what if we don't define constructor. Is it mandatory?
@avrajitsikder9646
@avrajitsikder9646 8 ай бұрын
if you don't define define constructor , JVM will invoke the default constructor. But when you define a constructor as your way it restrict the invoke of default constructor. For that it is mandatory.
@JohnSmith-vm6ln
@JohnSmith-vm6ln 9 ай бұрын
Bhai isko dekh ke bhuk lag gyi ;). Could have better example like DB connection class or something else.
@shaikhgulab631
@shaikhgulab631 Жыл бұрын
Sir plz change themes
@Abhishek-df5tf
@Abhishek-df5tf 5 ай бұрын
Yes
@rajdippal51
@rajdippal51 Жыл бұрын
Please make a video how to create singleton pattern using enum
@santoshhsah
@santoshhsah 11 күн бұрын
Hi Durgesh, There's a little mistake I think Each thread has its own stack, and different threads can have diff object values, I guess the instance datamember should be volatile.
@syedfaizan5841
@syedfaizan5841 11 ай бұрын
❤❤❤
@souravpaul6086
@souravpaul6086 Жыл бұрын
Hi, your videos are so informative I learned a lot from your videos thank you for making informative videos for us. I have a request could you please make a video where linkedin and twitter used as social login platform instead of github and google that can be very useful. Please make a video on this topic
@khansamar6889
@khansamar6889 Жыл бұрын
Interview mein design pattern ke bare mein bahot puchte hai
@Abhishek-df5tf
@Abhishek-df5tf 11 ай бұрын
Please use eclipse and change theam
@lets_crack.
@lets_crack. Жыл бұрын
After singleton design pattern there is no video uploading yet.As soon as possible plz share us.😊
@ajinkyajadhav7665
@ajinkyajadhav7665 Жыл бұрын
hello sir plz make a video on mockito test cases
@geopluse6336
@geopluse6336 10 ай бұрын
sir video dhekke bhuk laggaya
@YashSin2025
@YashSin2025 Ай бұрын
Gu khale
@chhaseebkhalid6499
@chhaseebkhalid6499 Жыл бұрын
good
@iamsaqeebpathan
@iamsaqeebpathan 2 ай бұрын
Last one is called double lock singleton design pattern
@ArvindKumar-bh1yt
@ArvindKumar-bh1yt Жыл бұрын
Arvind Kumar, Working as Consultant, Pune
@onkarkatkar2582
@onkarkatkar2582 Жыл бұрын
theme name pls
@rohitjaiswal946
@rohitjaiswal946 8 ай бұрын
In Samosa, we are checking if(Samosa==null) and then creating an object, whereas in the case of Jalebi we are creating new object every time the get method called. So my question is why can't we remove the 'if check' in Samosa(I tried but it print different hashCode. Please help me anyone, I am new to Java and need some understanding.
@krishnarai9843
@krishnarai9843 8 ай бұрын
if we remove the if condition after that when we call the method it create new object every time in heap so, because of that your hash code always different. if we don't remove the if condition at first time it create object because there is null in samosa variable and after that it always give the that object which is store in samosa variable
@Abhishek-df5tf
@Abhishek-df5tf Жыл бұрын
Sir I request u Please Change theme
@shubhangimahajan5089
@shubhangimahajan5089 Жыл бұрын
👍🙏
@shahabu.developer
@shahabu.developer 11 ай бұрын
i am from bihar
@CuriousVivek
@CuriousVivek Жыл бұрын
Use eclipse bro
@SubelalPal
@SubelalPal Жыл бұрын
Pls change themes
@dipeshupadhyay5583
@dipeshupadhyay5583 Ай бұрын
Hyderabad
🔥3 Ways to break singleton pattern | Solution of Problem in detail | Hindi
18:36
🔥Lets understand Factory Design Pattern in Hindi
15:06
Learn Code With Durgesh
Рет қаралды 73 М.
Война Семей - ВСЕ СЕРИИ, 1 сезон (серии 1-20)
7:40:31
Семейные Сериалы
Рет қаралды 1,6 МЛН
Wednesday VS Enid: Who is The Best Mommy? #shorts
0:14
Troom Oki Toki
Рет қаралды 50 МЛН
Как Ходили родители в ШКОЛУ!
0:49
Family Box
Рет қаралды 2,3 МЛН
Singleton Design pattern in Java | Best Practice | Java Techie
16:00
How does HashMap internally works | Java Interview Questions in Hindi
17:04
Learn Code With Durgesh
Рет қаралды 109 М.
🔥Builder Design Pattern in Hindi | Design Pattern Series
16:24
Learn Code With Durgesh
Рет қаралды 43 М.
13. Java Singleton and Immutable Class Explained with Examples | Java Classes in Depth - Part4
28:26
What is Singleton Pattern in Java - How to achieve this?
15:21
Naveen AutomationLabs
Рет қаралды 24 М.
Core Java With OCJP/SCJP: OOPs(Object Oriented Programming) Part-17 || singleton class
35:18
Война Семей - ВСЕ СЕРИИ, 1 сезон (серии 1-20)
7:40:31
Семейные Сериалы
Рет қаралды 1,6 МЛН