Multi-Threading using Java🔥🔥 | Java Multithreading in one video | HINDI

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • In this video, we are going to learn the whole basics of multithreading programming using java. we will cover all the basics starting from zero and till producer and consumer problem.
    Multi-Threading using Java | Java Multithreading in one video | HINDI
    Source Code: www.learncodew...
    Important Videos:
    ➡️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 in one video : • Kotlin | Learn Kotlin ...
    ➡️Complete Python Project - RUclips downloader in one video : • Jquery in one video in...
    Important Playlist:
    ➡️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:
    ➡️OnlyJavaTech- Programming Tutorial:
    ➡️Free Hindi video courses:
    ➡️TechSoft INDIA: www.techsoftin...
    ➡️Follow me on instagram: / durgesh_k_t
    ➡️Follow my page : onlyjavatech: / onlyjavatech
    topics covered:
    multithreading in java,
    multithreading in java hindi,
    multithreading using java in Hindi,
    what is multitasking in hindi,
    what is mutiprocessing in hindi,
    what is multithreading in hindi,
    how to create threads in java ,
    how to start threads in java,
    how to perform operations with threads in java,
    what are the methods of threads class,
    how to implement the runnable interface,
    how to make thread sleep in java,
    what is daemon thread ,
    how to create daemon thread in java,
    how to implement producer and consumer problem,
    how to make producer and consumer problem in java

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

  • @SubstringTechnologies
    @SubstringTechnologies 2 года назад +50

    Thead class implements Runnable interface ***at 14.30

    • @LearnCodeWithDurgesh
      @LearnCodeWithDurgesh  2 года назад +28

      Class always implements interface...
      Class always extends another class
      It's basic java concept

    • @codinghaters
      @codinghaters 2 года назад +12

      @@LearnCodeWithDurgesh Exactly, you are the person behind my interest in coding... I never been in love with coding. But your teaching always make things easy.
      ***Intresting Fact- An Interface extends another Interface :-) ***

    • @amdgamer9362
      @amdgamer9362 Год назад +3

      @@LearnCodeWithDurgesh his saying that you tell us in your diagram thread class extends runnable interface at 14.30

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

      @@LearnCodeWithDurgesh sir aap bohot badhiya sikhate ho ❤ thank you so much

    • @MerajKhan-cy3pb
      @MerajKhan-cy3pb 7 месяцев назад

      U can learn interface and inheritance before learning multi threading

  • @akshayengineer2018
    @akshayengineer2018 3 года назад +3

    Pure internet par multithreading ka itna easiest way of learning kaha par bhi nhi milega... sirf yaha pe hi available hai... Thank You Durgesg Sir...

  • @parichaykhurana4774
    @parichaykhurana4774 3 года назад +5

    This is the best Multi Threading video in the whole RUclips

  • @rutujabhurse3291
    @rutujabhurse3291 Год назад +9

    Your teaching is just way too good. It would be the best thing on earth if you start teaching DSA.

  • @poojababar8746
    @poojababar8746 4 года назад +6

    one of the best Multithreading explanation video on youtube
    keep it up sir
    thank u

  • @vinaysingh2971
    @vinaysingh2971 3 года назад +5

    Great...You are going to bring India at first position in the digital world by your teaching.

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

    read so much content related multithreading , pr aaj gyan mila .sare concept clear ho gaye...🤟🤟🤟

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

    Durgesh bhaiya is the best Trainer .......

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

    Too good bhai.... And since it is in hindi....aur jyada acchha lagta h 😊😊

  • @rukaiyagheewale8516
    @rukaiyagheewale8516 2 года назад +3

    Detailed ,informative and easily understandable content. Great Job!

  • @guptajicodes
    @guptajicodes 2 года назад +1

    This video is very much informative to me. Aspiring to be a Java developer.

  • @alokanand851
    @alokanand851 3 года назад +2

    Really good post. Only one suggestion, producer method should have a return type and consumer method should not have any return type.

  • @008jaiminbhatt6
    @008jaiminbhatt6 Год назад

    Threading Made Super easy .... 🙏Thank you

  • @md.billalhosen820
    @md.billalhosen820 Год назад

    Thank you. I enjoyed the class. From Bangladesh.

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

    Teaching level and voice level high🙏👍🏻

  • @manojkumar-qm4mx
    @manojkumar-qm4mx Год назад

    Awesome way of teaching thank you so much sir for this wonderful explanation

  • @hkkabir2024
    @hkkabir2024 2 года назад +1

    amazing. the synchronized part was really a nice example.

  • @sarthakbhargava3514
    @sarthakbhargava3514 2 года назад +20

    Amazing bro, great explanation. I never imagined i'll get that kind of practical implementation, other youtube videos be like- What is Multithreading, wait(), sleep(), notify() and The end.
    A Big salute to you and your entire work man.🙌

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

    first time clear samaj aaya ye wait notify concept..

  • @AmritAgarwal07
    @AmritAgarwal07 Год назад +1

    Most interviews asked questions on the Executor framework. of thread Can you make video on that?

  • @RakeshSingh-kl8dd
    @RakeshSingh-kl8dd 4 года назад +1

    Best lecture on multithreading, god bless u

  • @SandeepKumar-so2st
    @SandeepKumar-so2st 4 года назад +7

    Next spring mvc please

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

    Very informative, thank you so much!!!

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

    thanks for explaining Producer consumer problem.

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

    Sir . I don't like comparison. But you are impressive than Durga sir. Thanks

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

    Great Work Bro..It is Really Helpful..Keep it Up Good Work!!!

  • @maheshshirsat9075
    @maheshshirsat9075 2 года назад +1

    bhai apne ThreadOp class banaya aur usme thread methods use kiya ..but apne ThreadOp class ko Thread ke sath extend nhi kiya ...pr apne bola tha ki methods use karne ke liye thread class use karna padta hai?

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

    Thank you so much Sir...you made it very easy

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

    Amazing Explaination Thankyou sir

  • @jk47nitk
    @jk47nitk 3 месяца назад

    great and easy explanation

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

    Very nice sir

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

    really amazing explanation

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

    Mind-blowing video bhai

  • @GAURAVKUMAR-sx5mp
    @GAURAVKUMAR-sx5mp 2 года назад

    This is sufficient or we learn according to time

  • @nimishgupta5289
    @nimishgupta5289 10 месяцев назад

    Using lambda expression-
    public static void main(String[] args) {
    Runnable myThread = () -> {
    for (int i=0; i

  • @harshpatel105
    @harshpatel105 4 года назад +3

    Amazing work :D

  • @MdForhad-fy7vx
    @MdForhad-fy7vx Год назад +1

    how thread class extends runnable inteface? i think it should be implement as runnable is an interface.

  • @AsifKhan-sm1gr
    @AsifKhan-sm1gr 2 года назад

    sir you are amazing

  • @pappubhogarao
    @pappubhogarao 11 месяцев назад

    Informative video

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

    Thank You Sir!

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

    Brilliant tutorial

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

    AAG Lga Di

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

    Sir you are great

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

    nicely done....

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

    Thank you

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

    sir thread class runnable interface ko kaise extends kar shakta hai?

  • @kamilcomedy
    @kamilcomedy 2 месяца назад

    Thanks sir

  • @hymnish_you
    @hymnish_you Месяц назад

    its wrongly said that when parent thread dies, daemon thread will also die. it waits until JVM terminated or until daemon thread explicitly die using measures like Thread.stop().

    • @hymnish_you
      @hymnish_you Месяц назад

      Here's the code to understand the concept!
      ```
      public class Multithreading {
      public static void main(String[] args) throws InterruptedException {
      Thread parentThread = new Thread(() -> {
      // Creating a daemon thread inside the parent thread
      Thread daemonThread = new Thread(() -> {
      while (true) {
      System.out.println("Daemon thread running...");
      try {
      Thread.sleep(1000);
      } catch (InterruptedException e) {
      e.printStackTrace();
      }
      }
      });
      daemonThread.setDaemon(true); // Set as a daemon thread
      daemonThread.start();
      // Parent thread finishes execution
      System.out.println("Parent thread is done.");
      });
      parentThread.start();
      // Sleep main thread to keep program alive for a while
      try {
      Thread.sleep(5000); // Main thread sleeps for 5 seconds
      } catch (InterruptedException e) {
      e.printStackTrace();
      }
      System.out.println("Main thread exiting...");
      }
      }
      ```

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

    Please make a video on codechef and codeforces competitions!

  • @nibin.gvarghese6285
    @nibin.gvarghese6285 3 года назад

    u r a champion

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

    the programs for producer consumer, in consumer there is some issue. Output not coming as expected.

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

    thank you

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

    Thread class implements runnable NOT extends

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

    nice video sir

  • @DMarutiGurav
    @DMarutiGurav Год назад +2

    Runnable is an interface and thread is a class..so thread (class)will implements Runnable (interface) not extends

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

    Thank you bhai, kehr mcha rkhi apne

  • @AdityaDahiya99
    @AdityaDahiya99 2 года назад +1

    When exactly is the run () method in the thread called internally?

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

    Tq vro!!!!!!!!!!!!!!!!!!

  • @sourabhgarg2890
    @sourabhgarg2890 7 месяцев назад

    if thread class implemnets the runable then why need to implemnet it again in myanother class?

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

    thanks u sir!!!!!

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

    kindly help me out in this program how to do it
    Implement two multithreaded classes, one of which will be used to print ‘H’, and
    another one will be used to print ‘O’.The output should contain a single string containing N occurrences of “”HHO”, in the
    same order.
    public class Main {
    static int c=0;
    static int i;
    public static class printH extends Thread {
    //write your Code here:
    }
    public static class printO extends Thread {
    //write your Code here:
    }
    public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    Integer n = sc.nextInt();
    System.out.println();
    //Write your output here:

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

    Sir what is executor frame work then

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

    Awesome tutorial sir❣️

  • @shanker_23
    @shanker_23 2 года назад +2

    Hi Bro , Amazing vedio , can you explain me - Why have created a constructor of Consumer and producer , can we call the methods by simply using the Company object , please tell bro , in that case what would be the error?

  • @mohitsinghnegi1236
    @mohitsinghnegi1236 3 года назад +2

    sir wait throws checked exception so we have to handle it also in produce and consumer class???

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

    Majaaaaaaaaaaaaaaaaa agya!

  • @karansharma-et5lg
    @karansharma-et5lg 3 года назад +4

    so kind of you to share the knowledge in this simple way i found it very helpul .

  • @rajeshmittal11
    @rajeshmittal11 2 года назад +1

    Too much repetition of same things many times which making video lengthy.
    However content is very good

  • @SachinKumar-zy3zr
    @SachinKumar-zy3zr 3 года назад +10

    Worth it👏!!
    just few days ago i attended a mock interview , interviewer asked about thread life -cycle and questions related to that , i wasn't clear with my approach ,, and already read tons of stuff regarding that but wasn't able to convince him,, after watching approx 1:30 hrs. video ,, i can explain it to anyone.

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

      Btw how do we know what interviewers gonna ask us?

  • @AkshayAgarwalCoding
    @AkshayAgarwalCoding 2 дня назад

    Thanks for explaining Multithreading!
    It was really helpful!!!

  • @SHRESTHAPRAKAS
    @SHRESTHAPRAKAS 4 года назад +3

    Very helpful video

  • @VivekDivekar-zt2wd
    @VivekDivekar-zt2wd Год назад

    grt person

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

    su = new SEARCHUPDATE();
    su.start();---------------------> i click this button agian n agian than error ata hai
    ise mien bar bar click karta hun tou yh error deta hai
    " Exception in thread "Thread-8" java.lang.ArrayIndexOutOfBoundsException: 2 >= 2 "

  • @pratimsarkar3769
    @pratimsarkar3769 11 месяцев назад +1

    Thank you sir🙏🙏🙏...you are doing great work......I love this MultiThreading video

  • @AbhishekKumar-nn9ck
    @AbhishekKumar-nn9ck Год назад

    I am just confused why constructor here... With Company parameters... Anybody can explain... Please do? 😥

  • @santoshkumar-hz4yh
    @santoshkumar-hz4yh 3 года назад +2

    ye kaise decide hota hai hame kitna thread create karna hai ye project ke requirement pe depend karta h kya aur hm maximum kitna thread create kar sakte hai

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

      Project or program requirement ke hissab se aap thread bana sakte ho

  • @666_kanishkanarayan3
    @666_kanishkanarayan3 Год назад

    why is product_item function void but consume_item is int?

  • @nirmalgurjar8181
    @nirmalgurjar8181 8 дней назад

    Great Video but I think we don't need synchronised keyword here, as each method is being used by single thread meaning only one thread is using produce or consume method. synchronised is useful when same resource is being used by multiple threads.

  • @prajjawalkumarpatel9360
    @prajjawalkumarpatel9360 8 месяцев назад +2

    kya gazab pdate hai sir mjaa aa gya etna lamba video ak baar dekha producer consumer project bhi bna liya oor mja bhi aa gya....

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

    Sir spring boot pe series karo

  • @praneeth871
    @praneeth871 2 года назад +1

    If u had give sleep time same for both then no need of wait and notify

  • @SharifAlam-tt3ej
    @SharifAlam-tt3ej 2 года назад +1

    Sir Aap ke samjane ka tarika Saurabh Shukla sir bhi bhaut accha hai kiyunki sir hm long Hindi Medium jo programming A tak nahi jante hai but video dekhne se bhaut cheez samaj jo hame college me samaj nahi aaya tha thank sir hamari dua AAP KHUB TARRKI KARE OR hame jaise gareeb bacche gayan deta rahen

  • @DMarutiGurav
    @DMarutiGurav Год назад +2

    One of the best channel for learning..I preferred this channel for any concept rather than other

  • @alokprajapati4504
    @alokprajapati4504 3 года назад +2

    Amazing Explanation Bro Producer Consumer superb and simply explained...

  • @Chaloobolo
    @Chaloobolo Год назад +1

    Durgesh you haven't covered Advanced Multithreading API's i.e , Executor Framework.

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

    Kindly Make Video On Design Pattern In one video

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

    Thanks Durgesh bhai,...for creating awesome content...

  • @shaktisinghbhadoriya788
    @shaktisinghbhadoriya788 Месяц назад

    Thanks. Please make a video on join() two threads and notifyAll(). If created please share the link...

  • @ayushipandey1646
    @ayushipandey1646 2 года назад +1

    Producer consumer problem:-
    56:19

  • @aavesh.bagwan
    @aavesh.bagwan Год назад

    How you have called wait() and notify() method directly without any thread class object.

  • @zomzhack
    @zomzhack 3 года назад +2

    Nice 😍🥰😍

  • @GautamKumar-yv7li
    @GautamKumar-yv7li 2 года назад +1

    please make video on DS sir

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

    Every content is great ecplain but thread class implement runnable interface

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

    Sir,
    Kya aap ne MyAnotherThraed ko alag package me banaye hai ki dono ek hi package me Banega ..plzz koi bta do ??

  • @amitraj-bo5yp
    @amitraj-bo5yp 4 года назад +2

    Sir Spring mvc ka vdo bhi upload kro.

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

    [Suggestion] Everything is great. But you need to give better object/variable names. I see you give t1, comp, f, like this. Instead you can go with Thread thread1, Company company. Simple! In case of boolean f = false; You should have given boolean isProduced = false; Rest all Great!

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

    why company object passed to both producer and consumer?

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

    Superb Sir

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

    i have send you an emial please checkyour inbox its urgent

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

    Bro please upload collection videos please I'm eagerly waiting

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

      Ok bro i will try as soon as possible

    • @ShivamGupta-xw3gx
      @ShivamGupta-xw3gx 3 года назад

      @@LearnCodeWithDurgesh sir if u have pdf of this video then plzzz send me