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

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • In this video we are going to learn about the single design pattern in detail with examples.
    Full Playlist: • Design Patterns Tutori...
    Article Link: learncodewithd...
    Telegram Link for Doubt: t.me/learncode...
    Important Videos:
    ➡️React JS with Project : • 🔥 🔥 Complete React Js ...
    ➡️Learn JDBC in one video: • JDBC Crash Course in 1...
    ➡️Learn Python in One Video: • Learn Python in One Vi...
    ➡️Learn HTML in one video: • Jquery in one video in...
    ➡️Learn HTML form in one video: • Jquery in one video in...
    ➡️Learn JavaScript in one videos: • Learn JavaScript in O...
    ➡️Learn Form Validation using javascript and jquery: • Form Validation using ...
    ➡️Learn CSS in one video: • Jquery in one video in...
    ➡️Jquery in one video: • Jquery in one video in...
    Kotlin is one video: • Kotlin | Learn Kotlin ...
    ➡️Complete Python Project - CZcams downloader in one video: • Jquery in one video in...
    Important Playlist:
    ➡️Spring Boot Tutorial with Project : • Spring Boot Tutorial i...
    ➡️Spring MVC Tutorial: • Spring MVC Tutorial St...
    ➡️Complete Spring Framework Tutorial: • Spring Framework Tutor...
    ➡️Hibernate Tutorials: • Hibernate Tutorial for...
    ➡️E-Commerce Project using Java: • E-Commerce Project usi...
    ➡️AWS Free Java Hosting Playlist: • AWS Hosting Tutorial |...
    ➡️Hibernate Tutorial Playlist: • Hibernate Tutorial for...
    ➡️Learn Technology in One Vides: • Learn in one video : C...
    ➡️Programming Tips for Programmers: • Coding Tips and Discus...
    ➡️Complete Python for Beginners: • Complete Python Tutori...
    ➡️Important Python Projects: • Python Projects in Hindi
    ➡️Complete Servlet & JSP : • Servlet and Jsp (Serve...
    ➡️Complete JDBC ( Java Database Connectivity) : • JDBC(Java Database Con...
    ➡️Complete Java Project : TechBlog: • Full Java Advance Pro...
    ➡️Java Swing Projects: • Java Projects for begi...
    ➡️Java Core Concepts: • Java Core Tutorial
    ➡️Kya aap Jante hai Series: • kya app jante hai : s...
    Important Links:
    👉Official Website (Source Code): learncodewithd...
    👉Telegram Discussion Group: t.me/learncode...
    👉Follow me on Instagram: / durgesh_k_t
    👉Follow on Facebook / learncodewithdurgesh
    Disclaimer:
    All videos are for educational purposes and use them wisely. Any video may have a slight mistake, please take decisions based on your research. This video is not forcing anything on you.

Komentáře • 104

  • @Ritesh00777
    @Ritesh00777 Před 5 hodinami

    Thanks durgesh
    Finally I found a good and simple explanation on design patterns it's easy to understand and adaptable

  • @SARTHAK-IO
    @SARTHAK-IO Před rokem +4

    Bhai bhai 😂🔥🔥🔥🔥, literally itne depth mei aaj tk kisi ne nh padhaya ,

  • @naveedzaman3533
    @naveedzaman3533 Před 6 měsíci +1

    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

  • @adityabhadoriya3191
    @adityabhadoriya3191 Před rokem +5

    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 Před 3 měsíci +3

    You make coding feel so easy.

  • @susmithanadar4034
    @susmithanadar4034 Před 3 měsíci

    Thank you for helping me prepare for my interviews. Your videos really matter to people like me.

  • @ankukulhade786
    @ankukulhade786 Před rokem +1

    i have seen many video of singleton but never seen such video. Thanks for sharing.

  • @ishaansharma8366
    @ishaansharma8366 Před 25 dny

    Salute to you sir jee. My every single doubt is cleared for interview preparations. ❤❤❤❤❤

  • @Kahanikduniya-q6i
    @Kahanikduniya-q6i Před 11 měsíci

    Thank you sir , itna ache se to paid course me bhi nahi sikha hoga kisi ne ....:)

  • @hrds479
    @hrds479 Před 5 měsíci +1

    glowing fire while typing nice it look amazing

  • @pawanpathak6576
    @pawanpathak6576 Před rokem +1

    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.

  • @strangemate
    @strangemate Před 5 měsíci

    Wow, must say gajab and super simple explanation..bahut badiya..may God bless you buddy

  • @GauravKumar-pw8xr
    @GauravKumar-pw8xr Před 11 měsíci +1

    Hello sir
    I like your videos a lot and admire your hardwork. Please please make a series on multi threading and concurrency.

  • @yashin8902
    @yashin8902 Před 8 měsíci

    Thank you so much for making these type of videos that makes complex topics very simple and easy.

  • @souravdas6918
    @souravdas6918 Před 8 měsíci

    bhai thank u.. jalebi samosa example se single ton pattern ka doubt clear ho gaya ....

  • @rohitjaiswal946
    @rohitjaiswal946 Před 4 měsíci

    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?

  • @user-eq4lg5fg1f
    @user-eq4lg5fg1f Před měsícem

    Good Tutorial Video. Thanks from Kathamndu , Nepal

  • @LuckyMarathon-vr4yl
    @LuckyMarathon-vr4yl Před měsícem

    More than perfect ... very good explanation

  • @strangemate
    @strangemate Před 5 měsíci

    Hi Durgesh, what is the reason of providing the class literal inside the synchronize block?

  • @user-rp9rx6md6d
    @user-rp9rx6md6d Před měsícem

    thanks , nice explanation

  • @mdtauseef5482
    @mdtauseef5482 Před 7 dny

    Gazab bhai 💥💥💥

  • @shrabonisinha
    @shrabonisinha Před 28 dny

    Thank you so much. Outstanding explanation

  • @user-ft9pn3lw3b
    @user-ft9pn3lw3b Před 11 dny

    Hi Durgesh, why you did not pass private constructor in eager way of creating singleton?

  • @rupeshpatil6005
    @rupeshpatil6005 Před rokem +1

    ThankYou Sirji
    Sir Please make This Design PATTERN PlayList we Want More Videos

  • @tanulakhwani
    @tanulakhwani Před 3 měsíci

    Very easily understandable. Thanks

  • @user-ks9bv2fh4m
    @user-ks9bv2fh4m Před 3 měsíci +1

    really very informative

  • @LowProfie_
    @LowProfie_ Před rokem +1

    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. 😢

  • @shubhambhardwaj8894
    @shubhambhardwaj8894 Před rokem

    Sir apke examples se toh muh me pani aa jata hai🤤😋

  • @ashishSinghSengar17
    @ashishSinghSengar17 Před 5 měsíci

    Thank you for providing such quality content

  • @dailyyogaathome
    @dailyyogaathome Před 5 měsíci

    Well explained Durgesh!
    Please create these videos for Python if possible!

  • @LawrenceGates-zl9zp
    @LawrenceGates-zl9zp Před rokem

    Waris Waheed from Pakistan, Love your content

  • @devkumar9889
    @devkumar9889 Před 2 měsíci

    We can also use Static data and members instead of singleton ?

  • @Mrsakina570
    @Mrsakina570 Před 5 měsíci

    ur just great man

  • @shadan948
    @shadan948 Před rokem

    Maza aaya sir 😘
    Aur ye maza pure software engineer ko milna chahiye 🤣

  • @vinaychauhan7627
    @vinaychauhan7627 Před 5 měsíci

    Hi, I do have a question, Why are we using extra if condition and not making single if condition as synchronized block?

  • @saurcandy1600
    @saurcandy1600 Před měsícem

    Bro - bht bhala manus ho aap.

  • @poojarath7087
    @poojarath7087 Před měsícem

    Thank u sir 🙏

  • @amitsaonerkar6640
    @amitsaonerkar6640 Před rokem

    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.

  • @heramsharma1747
    @heramsharma1747 Před 8 měsíci

    Very nice video
    As per expectation 🎉😊

  • @debbrataroy7276
    @debbrataroy7276 Před 13 dny

    Thanks sir

  • @GautamKumar-yv7li
    @GautamKumar-yv7li Před rokem +1

    please make videos for data structures and algorithms

  • @JohnSmith-vm6ln
    @JohnSmith-vm6ln Před 5 měsíci

    Bhai isko dekh ke bhuk lag gyi ;). Could have better example like DB connection class or something else.

  • @varaprasadpamarthi2649

    super explanation video is length but worth watching , thanks for your effort😊

  • @motivations2218
    @motivations2218 Před 4 měsíci

    My name is Umair and I am From Pakistan Sir.
    Great Sir

  • @deepakkarmaDK
    @deepakkarmaDK Před 6 měsíci

    Could please create series using c# ? Synchronised keyword not in c# .. so how it will work in c#

  • @djj.-gq4dl
    @djj.-gq4dl Před rokem

    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?

  • @shpreetamsingh1263
    @shpreetamsingh1263 Před 9 měsíci

    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 ?

  • @photolab6712
    @photolab6712 Před 6 měsíci

    bohoti accha explanation and video..

  • @crazygirlsmruti3109
    @crazygirlsmruti3109 Před rokem

    Thank you....... very good explanation

  • @the_shridhar
    @the_shridhar Před rokem

    Next level sir ji 🔥🔥🔥

  • @user-tp3fx6vf8n
    @user-tp3fx6vf8n Před 6 měsíci

    It's very good video ❤

  • @ommehta4501
    @ommehta4501 Před rokem

    very good
    please make the live project using these design patterns

  • @rohitjaiswal946
    @rohitjaiswal946 Před 4 měsíci

    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 Před 3 měsíci

      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

  • @souravpaul6086
    @souravpaul6086 Před rokem

    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

  • @shubhamsinghal7188
    @shubhamsinghal7188 Před 5 měsíci

    Sir, Poha bhi banado toh pura nashta hojaye 😍😍

  • @shaikhgulab631
    @shaikhgulab631 Před rokem +9

    Sir plz change themes

  • @callmeghostgamer
    @callmeghostgamer Před 11 měsíci

    Apka content bahut acha hota hai please change your keyboard 😂 bahut typo karta hai apka keyboard 😅

  • @AnuragKumar-kf4ic
    @AnuragKumar-kf4ic Před rokem +1

    Can you give example where to use lazy and where to use eager?

  • @palkherohit1
    @palkherohit1 Před 5 měsíci

    have one question, what if we don't define constructor. Is it mandatory?

    • @avrajitsikder9646
      @avrajitsikder9646 Před 4 měsíci

      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.

  • @rameshkumar-zk3or
    @rameshkumar-zk3or Před rokem

    Very informative.

  • @varnitajaiswal8569
    @varnitajaiswal8569 Před rokem

    very informative video

  • @prajjawalkumarpatel9360
    @prajjawalkumarpatel9360 Před rokem +1

    saare design pattern par video daliye

  • @user-yo5li3nn1p
    @user-yo5li3nn1p Před 9 měsíci +1

    Rohit Kumar from Jharkhand

  • @Radhe_Krishna2245
    @Radhe_Krishna2245 Před 5 měsíci

    #Radhe Radhe vrindavan se. H G❤

  • @Abhishek-df5tf
    @Abhishek-df5tf Před 6 měsíci

    Please use eclipse and change theam

  • @rajdippal51
    @rajdippal51 Před rokem

    Please make a video how to create singleton pattern using enum

  • @Abhishek-df5tf
    @Abhishek-df5tf Před 22 dny +1

    Why arr used dark theme

  • @sarahsheikh17
    @sarahsheikh17 Před 4 měsíci

    Wah! Ek video me 6 mahine ki semester ki parhai ho geya.

  • @geopluse6336
    @geopluse6336 Před 6 měsíci

    sir video dhekke bhuk laggaya

  • @lets_crack.
    @lets_crack. Před rokem

    After singleton design pattern there is no video uploading yet.As soon as possible plz share us.😊

  • @unemployedcse3514
    @unemployedcse3514 Před rokem

    Awesome 😍

  • @dProfessor_
    @dProfessor_ Před 10 měsíci

    got it sir thanks

  • @aparajitas4303
    @aparajitas4303 Před rokem

    Hello from Virginia.

  • @ainulkhan7292
    @ainulkhan7292 Před rokem

    Great sir

  • @v2factsandupdates327
    @v2factsandupdates327 Před 7 měsíci

    Awesome

  • @khansamar6889
    @khansamar6889 Před rokem +1

    Interview mein design pattern ke bare mein bahot puchte hai

  • @ketank6864
    @ketank6864 Před rokem

    awsome!

  • @avrajitsikder9646
    @avrajitsikder9646 Před 4 měsíci

    Just awwwsomeeeee💥💥💥💥,very informative.

  • @ajinkyajadhav7665
    @ajinkyajadhav7665 Před rokem

    hello sir plz make a video on mockito test cases

  • @ArvindKumar-bh1yt
    @ArvindKumar-bh1yt Před rokem

    Arvind Kumar, Working as Consultant, Pune

  • @gangadeviksalimath3690
    @gangadeviksalimath3690 Před 9 měsíci

    Sir which software u are using

  • @shahabu_java
    @shahabu_java Před 7 měsíci

    i am from bihar

  • @sachinrathor8532
    @sachinrathor8532 Před 2 měsíci

    In egar way forgot to make constructor private.

  • @chhaseebkhalid6499
    @chhaseebkhalid6499 Před rokem

    good

  • @syedfaizan5841
    @syedfaizan5841 Před 7 měsíci

    ❤❤❤

  • @Abhishek-df5tf
    @Abhishek-df5tf Před rokem

    Sir I request u
    Please Change theme

  • @SubelalPal
    @SubelalPal Před 11 měsíci

    Pls change themes

  • @simranarora2817
    @simranarora2817 Před rokem

    Simran from Rajasthan

  • @ayushjain7758
    @ayushjain7758 Před rokem

    bhopal madhya pradesh

  • @CuriousVivek
    @CuriousVivek Před rokem

    Use eclipse bro

  • @ankitsrivastava2994
    @ankitsrivastava2994 Před 9 měsíci

    Isse bolten hi OverConfidence class Samosa.

  • @onkarkatkar2582
    @onkarkatkar2582 Před rokem

    theme name pls

  • @shubhangimahajan5089
    @shubhangimahajan5089 Před 11 měsíci

    👍🙏

  • @Medsacollection
    @Medsacollection Před rokem

    Samiullah peshawar (Pakistan)

  • @raj_0119
    @raj_0119 Před dnem

    1 samosa se kam nhi chalega 😂😂😂

  • @shrad6611
    @shrad6611 Před 10 měsíci

    when halwai starts coding hahahhaha good video

  • @pranaydange7605
    @pranaydange7605 Před rokem

  • @theaveragesangeetkaar4620
    @theaveragesangeetkaar4620 Před 3 měsíci

    Thanks sir

  • @lalit28689
    @lalit28689 Před rokem

    thank you sir

  • @sameerkadgaye2048
    @sameerkadgaye2048 Před rokem

    Thank you sir