Lecture 41 Synchronizing multiple threads in Java Hindi

Поделиться
HTML-код
  • Опубликовано: 16 янв 2025

Комментарии • 236

  • @jamalwebdevelopment4841
    @jamalwebdevelopment4841 4 года назад +15

    Sir, you really deserve respect for providing your lectures free.Thank you

  • @viveknepal8959
    @viveknepal8959 4 года назад +5

    At 26:25 : D Sir, Bade bade programs mein chhote chhote mistakes hote rehte hai
    Really worthy to watch this playlist even in 2020 :-) Finally watched 40 videos upto now....
    All of them are quite informative, and are explained deeply with simplest possible explanation...
    Thank you so much for this

  • @ayushraghuwanshi9794
    @ayushraghuwanshi9794 4 года назад +5

    How anyone can teach at extreme level ? Sir u are superb , legend !! At 2020 I am studying java with ur videos. Thanks a lot for these videos.👍

  • @pankajhazra3241
    @pankajhazra3241 7 лет назад +1

    I had been confused as of how Synchronization works !!! Now i have a clear picture!!! Thanks!!!

  • @rohitnayak4610
    @rohitnayak4610 6 лет назад

    Sir aapka padane ka tarika bahut acha h jese ki aap phle live example dekar samja dete. Ho and baad m usi ko point m likh dete ho jisse ki student apni copy m note kr sake or baad m rivision kr sake jisse ki sari information subconscious mind m store ho jaye
    thank you sir
    Vande matram

  • @SmartProgramming
    @SmartProgramming 6 лет назад +2

    sir very good explanation, nice 👍🙂

  • @amitmaurya5589
    @amitmaurya5589 4 года назад

    ONE OF THE BEST EXPLANATION ON RUclips FOR FREE THANK YOU SIR.
    YOU ARE THE GOD IN TODAY'S ERA.

  • @terabaapfragmaster4723
    @terabaapfragmaster4723 6 лет назад +4

    sir you are great ...
    your teaching method is awesome....
    lots of prayer for you....

  • @gulzeibkhan17
    @gulzeibkhan17 9 лет назад +39

    SIR u r great ...lots of prayer for you...thanks for all videos..can u plz upload lectures about database connection with java???

  • @sushmagoswami3661
    @sushmagoswami3661 5 лет назад

    Ye to khatarnaak he explanation tha. All the doubts got extremely cleared.

  • @tapanjeetroy8266
    @tapanjeetroy8266 5 лет назад +9

    Thanks a lot for uploading it... You are doing a great job..
    Please friends let me know how this poem is-
    I am alone...-
    I am alone,
    In my life.
    I am alone,
    In my way.
    No one here,
    To call as dear.
    No one there,
    To call as fair.
    Everything scattered nothing set,
    Just to bear,never to get ?
    -By Tapanjeet Roy

  • @codelearner419
    @codelearner419 3 года назад +1

    sir you are genius

  • @sanddy1911
    @sanddy1911 8 лет назад +2

    You're the best teacher. Best explanation for everything. Thanks for the videos.
    PS: The paint section is really ugly please replace it with something else.

  • @sayantandas4057
    @sayantandas4057 4 года назад

    Sir you have given the bestest explanation of synchronization of multiple threads. Thanks sir

  • @padhaiparcharcha
    @padhaiparcharcha 3 года назад +1

    Sir is work ko ham join(); se bhi kar sakte hain.

  • @movie_mania9684
    @movie_mania9684 4 года назад +1

    Love you sir clearly understand the problem and how to handle it thanks sir love from nagpur 💯

  • @SaurabhSingh-kz5jv
    @SaurabhSingh-kz5jv 8 лет назад +5

    Your explainations are really awesome.....hat's off.

  • @AnuragRawat01
    @AnuragRawat01 Год назад

    One of the best teacher❤

  • @UniqueBansal44
    @UniqueBansal44 4 года назад +1

    Mja aagya dekh ke 😁😁

  • @kookaburra2374
    @kookaburra2374 4 года назад +1

    This is called concept!!!!

  • @YashDEVELOPER12
    @YashDEVELOPER12 2 года назад

    very nice explanation sir with example... really you are a great teacher

  • @Akaashlawande
    @Akaashlawande 7 лет назад

    sir u r so so so...... Great.... i really appreciate .
    Don't say share .... already share this video in my Whatsapp Group.

  • @YouTubeloveSachin
    @YouTubeloveSachin 5 лет назад +1

    sir, you are the best one I have seen so many videos on youtube but you are the best... the way of explaining awesome sir....really thank you so much....please make some videos on how to get a job as java developer as fresher...step by step with some important question ...please sir, its humble request sir...thanks

  • @gourabofficial1373
    @gourabofficial1373 5 месяцев назад

    really sir ! great teaching style , Thank u sir

  • @aryankalra5640
    @aryankalra5640 4 года назад

    You are very determined!
    Thank you for all of your efforts!!!

  • @shouviksinha7613
    @shouviksinha7613 6 лет назад

    you are a good man sir and a great teacher. i wis uwere our college faculty in our Computer Science department.Our departmet really needs you and your teaching

  • @CodewithJavaInfinity
    @CodewithJavaInfinity 6 лет назад

    so so............ awesome sir mind-blowing explained way

  • @AbhiSharma-pp8dh
    @AbhiSharma-pp8dh 6 лет назад

    shaandaar, Jabardast , Zindabaad

  • @NITINSHARMA-ug8up
    @NITINSHARMA-ug8up 8 лет назад

    sir u r d best..........ap acha kaam kar re hai

  • @TheExceptionCoding
    @TheExceptionCoding 6 лет назад

    Problem solving approach is excellent...sir

  • @darshitvachhani9790
    @darshitvachhani9790 5 лет назад +4

    26:18 sir maje ke mood me hain !!!!

  • @arijitdey534
    @arijitdey534 8 лет назад +5

    Sir,
    First thank you so much for uploading this video.
    I can't understand 'Private Account account'.Can you please explain?
    and one more thing,Can you please provide the full code in comment section?

  • @vedantgodhamgaonkar7896
    @vedantgodhamgaonkar7896 8 лет назад +5

    Have one doubt.. we are using threading for parallel run of a code. But using Synchronized we are anyhow stopping one thread and running the other one. So aren't we indirectly following linear execution for certain time? I am aware that it will be so fast that we can't even see this difference but just quoting a doubt in general...!! Btw thanks a lot for these amazing videos...!!

    • @be_like__prateek
      @be_like__prateek 6 лет назад +1

      i also have this doubt.... anyone pls help

    • @nitinhirve7854
      @nitinhirve7854 4 года назад +2

      Your code might have 1000 lines and only 5 lines of code needed shared resources, so rather than executing whole 1000 lines in linear fashion you can just synchronize that 5 lines.

  • @RahulZampanbai
    @RahulZampanbai 4 года назад +1

    you upload this video Dec 28, 2015 i take advantage in 20-12-2020

  • @sachinhissaria2766
    @sachinhissaria2766 5 лет назад +1

    Java by Saurabh Shukla Sir sir in dis video.in which line u hve made the object of class account ??

  • @SuRajNarale-cb9zh
    @SuRajNarale-cb9zh 2 года назад +1

    Sir ,
    private Account account ;
    Line samaj nahi aai

  • @Apurvsankhyadhar
    @Apurvsankhyadhar 5 лет назад

    Kaaafi gazab video, thanks sir!

  • @sehajdhingra5426
    @sehajdhingra5426 9 лет назад +3

    sir you r excellent lecturer,....

  • @SaadAli-bb7jd
    @SaadAli-bb7jd 6 лет назад

    You are a great person May God bless you

  • @jankirawat6610
    @jankirawat6610 6 лет назад +1

    sir, i really really like your each videos & your teaching and your doing great work. i have share this channel to my colleagues friends . sir i have a request can u upload a easy readable notes for every programming language u teach. and i feel like there should be a professor like you in every IT colleges .

  • @sohamnavadiya1717
    @sohamnavadiya1717 9 лет назад +4

    Thanks for share video, I like your approach to explain concept in very easy manner. I request you to upload video of collection framework in JAVA.

  • @harshjoshi6257
    @harshjoshi6257 5 лет назад +48

    Always gotta speed it up to 2x 😅

  • @vibhudixit8336
    @vibhudixit8336 4 года назад

    Sir jab code thoda bada ho jaye to ek baar upar se niche poora show kr Diya kijiye. This helps in making notes.

  • @numananjum1861
    @numananjum1861 7 лет назад

    Sir you are great man...God Bless U

  • @Mayur___Ingale
    @Mayur___Ingale 5 лет назад +1

    sir
    private Account account ;
    ye kya tha smz me nhi aaya
    plz explain

  • @mintukumar-vj7ox
    @mintukumar-vj7ox 7 лет назад +1

    thank you sir aap ke samjhane ka tarika supar hai
    aap se request hai ki android ka lecture v upload kijiye

  • @jk2346
    @jk2346 4 года назад +1

    Thank You from 2020

  • @mohdwasim6138
    @mohdwasim6138 2 года назад

    nice shukla g..

  • @pravinkumar-ug8bg
    @pravinkumar-ug8bg 4 года назад

    Thank you very much sir. You have cleared all my doubts.

  • @shobhitbajaj9667
    @shobhitbajaj9667 7 лет назад +1

    aap bahut achha kam kar rahe ho

  • @shobhitbajaj9667
    @shobhitbajaj9667 7 лет назад +1

    me ye jan na chahta hu kya hum ek se jyada object bhi synchronized kar sakte he.

  • @abhishekgoel2127
    @abhishekgoel2127 5 лет назад

    Great person

  • @SonamSharma-ot9uo
    @SonamSharma-ot9uo 4 года назад

    Sir why the method void withdrawn of class account is running ,as we have not called it just we have made object we have not written like a1.withdrawn

  • @SHUBHAMSINGH-sw6kz
    @SHUBHAMSINGH-sw6kz 5 лет назад

    Sir U r great, no words for giving thanku to u

  • @smitshah9716
    @smitshah9716 3 года назад

    Can we extends account class to customer in this?

  • @RAJANKUMAR-oo8ki
    @RAJANKUMAR-oo8ki 4 года назад

    sir ye synchronizing block ka kam join() method se v to perform kr skte hai na ?

  • @aloksrivastava1090
    @aloksrivastava1090 9 лет назад +2

    Respected sir i Salute you sir.You are very awesome.
    I beg you sir please tell about Applet Class, Architecture, Skeleton, Display Methods. Swings: Japplet, Icons, labels, Text Fields, Buttons, Combo Boxes.

    • @javabysaurabhshuklasir3459
      @javabysaurabhshuklasir3459  9 лет назад +4

      +Alok Srivastava they are in the pipeline, coming very soon. I am currently uploading one video per day, but planning to upload 2 videos per day. Please visit www.mysirg.com for all updates

  • @zeeshanhashmi868
    @zeeshanhashmi868 7 лет назад

    Great sir.. really commendable work... Kindly share videos relevant to android app development if possible..

  • @SonuKhan-mp2yn
    @SonuKhan-mp2yn 6 лет назад

    Sir aapse to koi bewakoof bhi mahan ban Sakta hai
    Thank You very much Sir

  • @biplabghosh4219
    @biplabghosh4219 7 лет назад

    Sir, agar Acount class ka reference variable na banaye or object bana sakte hai kya

  • @mr_pawar_3
    @mr_pawar_3 5 лет назад

    Gajab hai sir

  • @vishwasrock4809
    @vishwasrock4809 7 лет назад +2

    sir
    private Account account
    ye samajh ni aaya
    plz help me

    • @priencthakur7602
      @priencthakur7602 7 лет назад

      It is actually passing the reference of Account class in account and passing this account to a customer.
      cheers

    • @Mayur___Ingale
      @Mayur___Ingale 5 лет назад

      @@priencthakur7602 like whole Account class reference in just one variable ?

  • @tmahesh3607
    @tmahesh3607 5 лет назад

    please any 1 explain 18:44 in that sir said account ka object hai na hamare pass...! how did he wrote account.isSufficientBalance plz explain

    • @priyansh_-_awadhiya_-.6760
      @priyansh_-_awadhiya_-.6760 4 года назад

      Ye baat Customer Class me likhi hai aur object to ExampleThread me call hua hai to Customer class me call karne k liye account variable ki help li hai
      I have a better modified code for the Same program. Check here:
      import java.util.Scanner;
      class Account
      {
      private int bal;
      public Account(int bal)
      { this.bal=bal; }
      public void isSufficientBalance(int w)
      { if (bal>w)
      { bal=bal-w;
      System.out.println("withdral money"+w);
      System.out.println("your current balance:"+bal); }
      else
      { System.out.println("Insufficient balance");} }
      }
      class Customer implements Runnable
      {
      private String name;
      private Account account;
      public Customer(Account account, String n)
      { this.account=account; name=n; }
      public void run ()
      {Scanner kb=new Scanner(System.in);
      synchronized(account){
      System.out.println(name+": Enter amount to withdraw");
      int amt=kb.nextInt();
      account.isSufficientBalance(amt);} }
      }
      public class ExampleThread
      {
      public static void main(String [] args)
      { Account a1=new Account(1000);
      Customer c1=new Customer(a1, "PRIYANSH");
      Customer c2=new Customer(a1, "KABIR");
      Thread t1=new Thread(c1);
      Thread t2=new Thread(c2);
      t1.start();
      t2.start();}
      }

  • @vishwamit
    @vishwamit 8 лет назад

    Hi Saurabh, Can we simply synchronize the withdraw method to achieve same result?

  • @sharvarithakar6137
    @sharvarithakar6137 6 лет назад +5

    Confused in line( private Account account )

    • @Mayur___Ingale
      @Mayur___Ingale 5 лет назад

      me bhi

    • @bhinderjit6606
      @bhinderjit6606 4 года назад

      i also

    • @priyansh_-_awadhiya_-.6760
      @priyansh_-_awadhiya_-.6760 4 года назад

      he declared a variable of account class in customer class. So that this variable can be put in constructor of Customer to point at object of Account class

  • @snehlatasarode1957
    @snehlatasarode1957 4 года назад

    very nice explanation sir 🙏🙏🙏

  • @SonuKhan-mp2yn
    @SonuKhan-mp2yn 6 лет назад

    Legendary Teacher

  • @yasirsultan7767
    @yasirsultan7767 4 года назад

    sir mera to synchronization k bger b wese he chal rha hy...iski kya reason?

  • @PrabhjotSingh-yt9qj
    @PrabhjotSingh-yt9qj 5 лет назад

    hello sir at 18:42 apne account class ka object bnaye bina account class ke sirf reference variable se account class ka function kaise call kiya?

    • @tmahesh3607
      @tmahesh3607 5 лет назад

      see i also got same doubt !look carefully he created Account type variable "account" thats why account could able to all the functions in the class Account because "account" is a Account type variable ! hope you understood

  • @sumitsharma-zt3ru
    @sumitsharma-zt3ru 8 лет назад

    sir aap great hai really.

  • @pranavmitan4011
    @pranavmitan4011 5 лет назад

    At 18:43 , you say that we have an object of account class but that's not an object...we only made a reference variable. Please Explain

    • @foodlover3128
      @foodlover3128 5 лет назад

      haa prr upr dekho hmne acc ka members use krne se pehle usko a1 account ka obj pass krdya account refrence mai...

  • @syedraghib7670
    @syedraghib7670 4 года назад

    No need to study in college when saurabh sir is here💖💖💖

  • @sanjaychaudhary3028
    @sanjaychaudhary3028 7 лет назад

    good session sir...i like.
    thank you so......much..

  • @faslesubhan2746
    @faslesubhan2746 7 лет назад

    you are the great sir g

  • @zenshyam
    @zenshyam 5 лет назад

    Amazing explanation sir

  • @mdishtiyaquehussain9564
    @mdishtiyaquehussain9564 5 лет назад

    #GREAT_SIR

  • @srikanths.v.1159
    @srikanths.v.1159 3 года назад

    sir output alag aa raha he before synchronization ka dono ka withdrawl show nhi kar raha pls guide

  • @SonamSharma-ot9uo
    @SonamSharma-ot9uo 4 года назад

    Sir why have u written private Account account in customer class..i am not able to understand...we have not made object of account in customer and then we can access the account class

  • @sahil.bundela
    @sahil.bundela 7 лет назад +1

    sir,
    what is a difference between inheritance and passing an object of one class into object of another class

    • @nitinhirve7854
      @nitinhirve7854 4 года назад

      In inheritance you are actually extending the existing class , it will be pro version of previous class. Where when you are passing object of one class in another class you are just calling functions of another class through functions of this class. But no direct connections between both classes.

  • @bilalnizamani7447
    @bilalnizamani7447 5 лет назад

    sir wesy hum join() method use kr k ye problem solve kr skty hain.

  • @Raw_Matter
    @Raw_Matter Год назад

    sir i did not understand the reference you that is Account account in customer class

  • @purnimadwivedi1645
    @purnimadwivedi1645 6 лет назад

    Mind blowing sir

  • @manishhooda871
    @manishhooda871 5 лет назад

    Sir aap bhut acha samjhate ho no doubt...... But threads wale sare topics me aapke code run nhi kr rhe h accordingly........ Ya to java ka compiler upgrade hone ki wajh se h ya fir kuch aur wajh h

  • @38_radheshyam78
    @38_radheshyam78 4 года назад

    Thanks sir🙏🙏🙏

  • @sahilanower9189
    @sahilanower9189 5 лет назад

    is this synchronization of multiple threads similar to just normal single threaded programming? Because i find them quite same.!!

  • @surajkhanna1129
    @surajkhanna1129 7 лет назад

    Great lec!!! had a doubt ,, so in this did we create a Refrence variable "acc" of an object "a1"

  • @harshraj8776
    @harshraj8776 5 лет назад

    Sir you are Great

  • @snehalsonawane7555
    @snehalsonawane7555 6 лет назад

    very gr8 video sir!!!

  • @dailyusegadgets789
    @dailyusegadgets789 6 лет назад

    Thanks alot sir.
    So amazing voice

  • @aishwaryajadhav3569
    @aishwaryajadhav3569 3 года назад

    Sir, why this program is so large?
    Thanku for making such lectures, I am beginner

  • @vijay-sp8kj
    @vijay-sp8kj 4 года назад

    Thanks so much 😊❤️❤️😊

  • @manindersaini4536
    @manindersaini4536 8 лет назад

    nice video sir g....

  • @kaushalkishor5443
    @kaushalkishor5443 6 лет назад

    Love you sir...💜

  • @varunmishra8389
    @varunmishra8389 7 лет назад

    Sir, what is the concept of MONITOR (also called Semaphore).. in synchronization??
    And also.. MUTUALLY EXCLUSIVE LOCK or MUTEX...??

  • @Itisme5
    @Itisme5 7 лет назад +1

    Hi Sir volatile key ka lecture i need to understand pls reply

  • @sushantkumarray3313
    @sushantkumarray3313 6 лет назад

    Sir,
    What is Daemon Thread ?

  • @shakeelhaider9100
    @shakeelhaider9100 8 лет назад

    Buhut Aaala

  • @mohitjariwala1896
    @mohitjariwala1896 5 лет назад

    great job man

  • @1MRahulvlogs
    @1MRahulvlogs 7 лет назад

    sir you are very nice teacher and thnx for good explaning.
    Sir plz upload a video of inter-thread communication, transient and volatile modifiers

  • @MayankSharma-fz2wv
    @MayankSharma-fz2wv 7 лет назад

    Superb!! great work..! Really Appreciate it! ;) (Y) !