Lecture 41 Synchronizing multiple threads in Java Hindi

Поділитися
Вставка
  • Опубліковано 16 гру 2024

КОМЕНТАРІ • 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!!!

  • @terabaapfragmaster4723
    @terabaapfragmaster4723 6 років тому +4

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

  • @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 UA-cam FOR FREE THANK YOU SIR.
    YOU ARE THE GOD IN TODAY'S ERA.

  • @sushmagoswami3661
    @sushmagoswami3661 5 років тому

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

  • @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???

  • @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

  • @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

  • @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 7 років тому +5

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

  • @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

  • @harshjoshi6257
    @harshjoshi6257 5 років тому +48

    Always gotta speed it up to 2x 😅

  • @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

  • @YashDEVELOPER12
    @YashDEVELOPER12 2 роки тому

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

  • @aryankalra5640
    @aryankalra5640 4 роки тому

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

  • @codelearner419
    @codelearner419 3 роки тому +1

    sir you are genius

  • @AnuragRawat01
    @AnuragRawat01 Рік тому

    One of the best teacher❤

  • @TheExceptionCoding
    @TheExceptionCoding 6 років тому

    Problem solving approach is excellent...sir

  • @gourabofficial1373
    @gourabofficial1373 4 місяці тому

    really sir ! great teaching style , Thank u sir

  • @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.

  • @kookaburra2374
    @kookaburra2374 4 роки тому +1

    This is called concept!!!!

  • @darshitvachhani9790
    @darshitvachhani9790 5 років тому +4

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

  • @CodewithJavaInfinity
    @CodewithJavaInfinity 6 років тому

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

  • @NITINSHARMA-ug8up
    @NITINSHARMA-ug8up 8 років тому

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

  • @RahulZampanbai
    @RahulZampanbai 4 роки тому +1

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

  • @arijitdey534
    @arijitdey534 7 років тому +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?

  • @pravinkumar-ug8bg
    @pravinkumar-ug8bg 4 роки тому

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

  • @SaadAli-bb7jd
    @SaadAli-bb7jd 6 років тому

    You are a great person May God bless you

  • @UniqueBansal44
    @UniqueBansal44 4 роки тому +1

    Mja aagya dekh ke 😁😁

  • @vedantgodhamgaonkar7896
    @vedantgodhamgaonkar7896 7 років тому +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 5 років тому +1

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

    • @nitinhirve7854
      @nitinhirve7854 3 роки тому +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.

  • @numananjum1861
    @numananjum1861 7 років тому

    Sir you are great man...God Bless U

  • @AbhiSharma-pp8dh
    @AbhiSharma-pp8dh 6 років тому

    shaandaar, Jabardast , Zindabaad

  • @sehajdhingra5426
    @sehajdhingra5426 9 років тому +3

    sir you r excellent lecturer,....

  • @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

  • @Apurvsankhyadhar
    @Apurvsankhyadhar 5 років тому

    Kaaafi gazab video, thanks sir!

  • @sachinhissaria2766
    @sachinhissaria2766 5 років тому +1

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

  • @shobhitbajaj9667
    @shobhitbajaj9667 7 років тому +1

    aap bahut achha kam kar rahe ho

  • @SHUBHAMSINGH-sw6kz
    @SHUBHAMSINGH-sw6kz 5 років тому

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

  • @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.

  • @SonuKhan-mp2yn
    @SonuKhan-mp2yn 5 років тому

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

  • @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

  • @syedraghib7670
    @syedraghib7670 4 роки тому

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

  • @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.

  • @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 .

  • @padhaiparcharcha
    @padhaiparcharcha 3 роки тому +1

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

  • @snehlatasarode1957
    @snehlatasarode1957 4 роки тому

    very nice explanation sir 🙏🙏🙏

  • @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

  • @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();}
      }

  • @RAJANKUMAR-oo8ki
    @RAJANKUMAR-oo8ki 4 роки тому

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

  • @shobhitbajaj9667
    @shobhitbajaj9667 7 років тому +1

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

  • @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

  • @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

  • @jk2346
    @jk2346 4 роки тому +1

    Thank You from 2020

  • @zeeshanhashmi868
    @zeeshanhashmi868 7 років тому

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

  • @Mayur___Ingale
    @Mayur___Ingale 5 років тому +1

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

  • @biplabghosh4219
    @biplabghosh4219 7 років тому

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

  • @mohdwasim6138
    @mohdwasim6138 2 роки тому

    nice shukla g..

  • @dailyusegadgets789
    @dailyusegadgets789 6 років тому

    Thanks alot sir.
    So amazing voice

  • @sanjaychaudhary3028
    @sanjaychaudhary3028 7 років тому

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

  • @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

  • @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...

  • @zenshyam
    @zenshyam 5 років тому

    Amazing explanation sir

  • @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 3 роки тому

      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.

  • @vishwamit
    @vishwamit 8 років тому

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

  • @sumitsharma-zt3ru
    @sumitsharma-zt3ru 8 років тому

    sir aap great hai really.

  • @namandeep4332
    @namandeep4332 5 років тому

    my question is that we should always use synchronization where multiple threads use the same resource at same time.

  • @yasirsultan7767
    @yasirsultan7767 4 роки тому

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

  • @bilalnizamani7447
    @bilalnizamani7447 5 років тому

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

  • @sahilanower9189
    @sahilanower9189 5 років тому

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

  • @aishwaryajadhav3569
    @aishwaryajadhav3569 3 роки тому

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

  • @abhishekgoel2127
    @abhishekgoel2127 5 років тому

    Great person

  • @sunilsahoo2799
    @sunilsahoo2799 5 років тому

    Sir with same code , when I am writing" enter amount "inside synchronized block , I am getting thread exception for second object , but if I am writing enter amount outside sync blck it is working

  • @smitshah9716
    @smitshah9716 3 роки тому

    Can we extends account class to customer in this?

  • @SonuKhan-mp2yn
    @SonuKhan-mp2yn 5 років тому

    Legendary Teacher

  • @harshuchadiya
    @harshuchadiya 3 роки тому

    Thank you so much sir, For this video still helpful to me and will helpful to us in future ❤️, And also sir let me know I want to develop *IOS Developer* Then what should I learn to become it ??

  • @RajatSingh-rh5hg
    @RajatSingh-rh5hg 5 років тому +2

    what has been done in the line:
    private Account account;
    i will be thankful if u explain the same

    • @Mayur___Ingale
      @Mayur___Ingale 5 років тому

      i am also in confusion

    • @YouTubeloveSachin
      @YouTubeloveSachin 5 років тому +1

      Its private instance variable of Account type... like we make int accNo....in this way..

  • @varunmishra8389
    @varunmishra8389 7 років тому

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

  • @sansk7767
    @sansk7767 7 років тому

    sir plzz make video on notify, notifyAll, wait, sleep method in detail with practical example..and what is deadlock, and how to cross calling in synchronised..

  • @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

  • @shobhitbajaj9667
    @shobhitbajaj9667 7 років тому +3

    thank you sirg.

  • @mohitjariwala1896
    @mohitjariwala1896 5 років тому

    great job man

  • @anilkushwahaji5788
    @anilkushwahaji5788 9 років тому +2

    very very nice tutorial,awesome

    • @bhagwanti9649
      @bhagwanti9649 6 років тому

      anil kushwahaji hlo what are you doing now days

  • @surajkhanna1129
    @surajkhanna1129 7 років тому

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

  • @faslesubhan2746
    @faslesubhan2746 6 років тому

    you are the great sir g

  • @MayankSharma-fz2wv
    @MayankSharma-fz2wv 7 років тому

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

  • @snehalsonawane7555
    @snehalsonawane7555 6 років тому

    very gr8 video sir!!!

  • @RohitKumar-dz8dh
    @RohitKumar-dz8dh 4 роки тому

    Sir , please make a video on interthread communication.
    It's humble request to sir..

  • @mr_pawar_3
    @mr_pawar_3 5 років тому

    Gajab hai sir

  • @m.nmirza2332
    @m.nmirza2332 7 років тому

    hello sir my IDE NetBeans show error
    Exception in thread "main" java.lang.UnsupportedOperationException: Not supported yet.
    at theardsexam.Theard.(Theard.java:15)
    at theardsexam.TheardsExam.main(TheardsExam.java:59)
    C:\Users\Edword\AppData\Local\NetBeans\Cache\8.2\executor-snippets
    un.xml:53: Java returned: 1
    BUILD FAILED (total time: 0 seconds) in all programs of Theards

  • @Itisme5
    @Itisme5 7 років тому +1

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

  • @prashantsrivastava54
    @prashantsrivastava54 6 років тому

    Sir pls make the video on interthread communication

  • @VishalThakur-zg7ub
    @VishalThakur-zg7ub 7 років тому

    Nice video Sir. Can you share the link to this program?

  • @purnimadwivedi1645
    @purnimadwivedi1645 6 років тому

    Mind blowing sir

  • @manindersaini4536
    @manindersaini4536 8 років тому

    nice video sir g....

  • @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