Core Java with OCJP/SCJP: Multi Threading Part-6 || join() || sleep() || Thread Interruption

  Рет қаралды 327,981

Durga Software Solutions

Durga Software Solutions

Күн бұрын

Пікірлер: 187
@Noname-sn6ty
@Noname-sn6ty Жыл бұрын
It’s been 8 years since this was released and it’s been 4 years where I refer them still while preparing for interviews. What a gem of a person Durga sir Thanks a lot from the bottom of my heart
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions Жыл бұрын
Hello Friend. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@Rajahmundry-timepass
@Rajahmundry-timepass 9 жыл бұрын
he took so long time to explain a concept . but that concept will remind in our mind forever.
@abhisheksaxena1839
@abhisheksaxena1839 6 жыл бұрын
That's why he's perfectionist of JAVA
@MrAshverma
@MrAshverma 5 жыл бұрын
This is a strategy to push the concept into your long term memory. You have the option to increase the speed.
@sairam8325
@sairam8325 8 жыл бұрын
Sir you are doing a lot of service to the society
@lakshayv3272
@lakshayv3272 3 жыл бұрын
min 7 hours sleep is needed, now u wont see issues but in future you will face many health problems, so sleep atleast 7 hours, being successful is good but health is everything
@ishagulati7237
@ishagulati7237 7 жыл бұрын
Java would have remained a PUZZLE(unsolved forever) for me if i had not found your java lectures sir... I am really very very thankful to you... Also your sense of humour makes it like cherry on cake... #Respect We will be obliged if you upload some lectures on advanced java as well...
@shahubaibiradar3467
@shahubaibiradar3467 Жыл бұрын
One of the best teacher.. way of teaching with practical execution on social media free ofcost which help lots of students
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions Жыл бұрын
Hello Friend. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@saurabhdsawant
@saurabhdsawant 5 жыл бұрын
after that sleeping story 28:42, my eyes were opened forever ! lol
@liveonyoutube5487
@liveonyoutube5487 4 жыл бұрын
That's a bitter truth, after listening that I am wake up at morning 6am.
@maobesoya7335
@maobesoya7335 6 жыл бұрын
Wonderful experience sir. Thanks from Colombia.
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Mao Besoya. Thanks for your valuable feedback.It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@kirankulkarnikirankulkarni
@kirankulkarnikirankulkarni 8 жыл бұрын
Hahahahah.... Snake example. You have some really good sense of humor
@Dead_Zone_0922
@Dead_Zone_0922 3 жыл бұрын
one of the most motivational video out of 203 (2-09-21)
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Bittu. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@parthjangid3587
@parthjangid3587 4 жыл бұрын
Sir your examples are epic😂, love all of them❤
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Parth. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@vkj5742
@vkj5742 4 жыл бұрын
SIR, you are the best teacher I have ever had in java :). Sir,please make videos on advance java servlets.
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Vaishnavi. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. For Adv. Java servlets videos, Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@josephpudupermanil704
@josephpudupermanil704 5 жыл бұрын
Durga SIR. Your Very Very Very Great Teacher, The way of explanation and making understand such a diffeculty concept Threads like a very very very easily. Nobody in the world could explain in a very understandable way suck like very difficult concept Threads.
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Joseph. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@pralhadkale5784
@pralhadkale5784 4 жыл бұрын
sir,Thanks for giving me a lesson of Bible..🙇‍♂️
@bhavanikasiviswanathan3707
@bhavanikasiviswanathan3707 3 жыл бұрын
Java means Durga. Duga means Java. Great tutorials Sir. Wish I could meet once.
@menkagoswami7817
@menkagoswami7817 5 жыл бұрын
hats off to your tutorial videos sir.... am understanding java just because of you...
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Menka Goswami. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@sharma_anil
@sharma_anil 7 жыл бұрын
sir u r simply amazing. I have a suggestion for you. Please expand your reach to the whole nation, advertise your channel. Make it big sir.
@sandhya6356
@sandhya6356 4 жыл бұрын
I enjoyed a lot through out the video😀
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Friend. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@manrdful
@manrdful 6 жыл бұрын
I just want to say big thanks for ur videos.
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Manoj. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@rajkoli8150
@rajkoli8150 5 жыл бұрын
Love u sir your a biggest hero in java
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Raj. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@ritiksrivastava2154
@ritiksrivastava2154 4 жыл бұрын
Your Teaching method is really superb
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Ritik. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@basubasu7811
@basubasu7811 8 жыл бұрын
DURGA you are my God..
@parvatkhansole9016
@parvatkhansole9016 3 жыл бұрын
Thanks a lot sir ....... your videos clear my all doubts
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello P K. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@sixface7841
@sixface7841 4 жыл бұрын
No one can beat durga❤
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Six. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@madhusudhankamalapuram7608
@madhusudhankamalapuram7608 3 жыл бұрын
No words ........sir your teaching 🙏🙏🙏
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Madhu. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@manashranjan1267
@manashranjan1267 9 жыл бұрын
Thank's Sir ...........................Your Explanation is very Good
@asrinivasareddy4066
@asrinivasareddy4066 6 жыл бұрын
Analogies are super Superb one is that snake women comparison in a movie for interrupt function
@funnyvideos-kd6vi
@funnyvideos-kd6vi 7 жыл бұрын
love the way u relate things too real world example..love u sir..
@03_afshanahmedkhan39
@03_afshanahmedkhan39 3 жыл бұрын
So enjoyable and lovable class !!
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Ahmed Khan. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@Ahmadyousafzai2
@Ahmadyousafzai2 3 жыл бұрын
@Afshan Ahmed Khan Are these lectures are still beneficial? Because these lectures are 5 or 6 years old and there may be a lot of updates are done in java.
@vamseeds0
@vamseeds0 5 жыл бұрын
Comparision between Yield , Join ,Sleep @ 1:37:40
@striverdaaadi
@striverdaaadi 11 ай бұрын
Java means durga sir😍😍
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 11 ай бұрын
Hello Friend. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@prasadmahakal2361
@prasadmahakal2361 2 жыл бұрын
Thanks God Of Java
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 2 жыл бұрын
Hello Prasad. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@-AjayChauhan
@-AjayChauhan 7 ай бұрын
Completed this video too 30 April, 2024 Day 54 of #75daysofcode in Java
@kavitayadav1323
@kavitayadav1323 2 жыл бұрын
36:40 sleep()
@EngineerVaibhav
@EngineerVaibhav Жыл бұрын
86th video completed🎉❤
@thinksix1925
@thinksix1925 4 жыл бұрын
Thanks for teaching sir 🙏
@gourishankarpatra203
@gourishankarpatra203 7 жыл бұрын
Superb Explanation Sir...
@hacking1007
@hacking1007 6 жыл бұрын
sir your explation is asomee i i like it sir please more upload video of graphics user interface in java please sir
@PandeyRavindra1
@PandeyRavindra1 8 жыл бұрын
awesome explanation sir great work..
@preetraj6506
@preetraj6506 5 жыл бұрын
You are a hero sir
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Preetraj. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@nishchayupadhyay4535
@nishchayupadhyay4535 2 жыл бұрын
Love u ANNA And Thank u ANNA:))))))))))
@omkarbartakke6253
@omkarbartakke6253 2 жыл бұрын
Sir your are great 👍, You can upload also Core Java Interview Question...
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 2 жыл бұрын
Hello Omkar. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@rizwanshahid1447
@rizwanshahid1447 7 жыл бұрын
Thanks so much, Durga Sir.
@manasranjanjena695
@manasranjanjena695 8 жыл бұрын
Thanks for nice explanation. Kindly upload video of Wait(), Notify(), Notifyall().... by Durga Sir....
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 8 жыл бұрын
Hello, We are very Happy to say Now you can access All DURGA Sir's Core Java with OCJP/SCJP Video Sessions(200 Videos,21 Chapters,200 hours ). To get Maximum Benefit from these video sessions, compulsory you have to write notes also. Sir will dictate each and every point clearly. Demo Sessions on KZbin: 1.LanguageFundamentals(16Videos) kzbin.info/www/bejne/m4W7lWtvqZ2hnas 2.Operators&Assignments(7Videos) kzbin.info/www/bejne/Z3uqgIOeft6bd68 3.FlowControl(6Videos) kzbin.info/www/bejne/jmfVhGyseZ6kgw 4.ExceptionHandling(10Videos) kzbin.info/aero/PLd3UqWTnYXOnSkaum39zWYI6bPb3i7liz Please give your valuable feedback and it is very important and helpful for us. Note:-If you are interested for full version of videos please revert back for more information. Fee : 6000/- Duration: 6-months DURGASOFT Online Training Team, Mobile : +91-8885 25 26 27, +91-7207 21 24 28 Mail ID : durgasoftonline@gmail.com , durgasoftonlinetraining@gmail.com
@manikantnigam31
@manikantnigam31 8 жыл бұрын
Very good video tutorial on multithreading...
@ujjwalshrivastava4199
@ujjwalshrivastava4199 2 ай бұрын
comparision of yield join sleep method on 01:37:20
@vicky271075
@vicky271075 5 жыл бұрын
Good. Bit long but worthwhile
@rakhigandhi6802
@rakhigandhi6802 5 жыл бұрын
great explanation !!
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Rakhi. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@rakhigandhi6802
@rakhigandhi6802 5 жыл бұрын
Subscribed.Glad to have found these videos! Want to check Collections too !!
@utsavmodh9698
@utsavmodh9698 9 ай бұрын
🎉🎉🎉🎉thnx 🎉🎉🎉🎉
@ayushipandey6924
@ayushipandey6924 5 жыл бұрын
At 1:13:25 my answer is Thread will give left and right😂😂
@prasannanivas4575
@prasannanivas4575 5 жыл бұрын
🤣🤣🤣🤣🤣🤣
@akshatahajare5014
@akshatahajare5014 4 жыл бұрын
Hello sir, Could you please explain how come the thread object is available for the threadjoinDemo class. Thanks
@saurabhdsawant
@saurabhdsawant 5 жыл бұрын
he likes the word intimate :)
@akshayrawat8847
@akshayrawat8847 6 жыл бұрын
so, when u said t.interrupt got executed the flow of control went to child class. so my question is when you commented t.interrupt() , the i am lazy thread printed 10 times howcome its never went to main thread and printed end of main??
@RiyazAhmed-ls2lm
@RiyazAhmed-ls2lm 4 жыл бұрын
also it starts with executing child thread so prints "i am lazy thread" then then comes back to main and prints "end of main" , is that correct ?
@vivekbudge9706
@vivekbudge9706 4 жыл бұрын
Thank you so much sir :)
@virajambole2950
@virajambole2950 Жыл бұрын
Sir or any respected can you tell me that ,in interrupt method example at 1:12:09 second ,how came first line "End of main thread" in output.............pls help me I not got it
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions Жыл бұрын
Hello Viraj. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@राजनगोंगल
@राजनगोंगल Жыл бұрын
👍👍👍👍👍👍
@amitasn1
@amitasn1 4 жыл бұрын
Hello Durga Software Solutions I have a doubt regarding Thread interruption of Child thread by Main Thread At 1:07:45 Shouldn't the output of program be:- I am Lazy Thread End of Main Thread I got interrupted Could you please explain step by step execution after t.start()
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Amit. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@akware977
@akware977 4 жыл бұрын
Thank you sir.
@sankalparora9374
@sankalparora9374 2 жыл бұрын
27:00 Sleeping is dangerous xD
@aamirnaved4331
@aamirnaved4331 3 жыл бұрын
All his life stories are linked with Java.
@pankajvyas4531
@pankajvyas4531 4 жыл бұрын
I was asked in interview that is it a good practices to keep sleep method in an if condition. Can you please help me understand what would be the effect?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Pankaj. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@bhuvanesheie
@bhuvanesheie 4 жыл бұрын
Hello Sir, Can you please upload videos for Java design pattern as well ? Eagerly waiting for you Design Pattern Tutorials
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Bhuvaneshele. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@unknownuser-wr3zm
@unknownuser-wr3zm 4 жыл бұрын
1:04:10 ... (jdk 14) even though the catch block executed, the "for" loop will continues its cinema!!!! y?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Yuvaraj. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@kumararvindgupta2380
@kumararvindgupta2380 8 жыл бұрын
Hello Sir If we can get Your lectures Of Design patterns then we will be very obliged.
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 8 жыл бұрын
Hi Kumar, Design Patterns videos are not available with us. very soon we will upload, plz keep in touch on KZbin
@prithvisahukar2270
@prithvisahukar2270 7 жыл бұрын
Durga Software Solutions Sir, please upload design pattern videos. I am really looking forward for them.
@RohitJadhav-lk7bv
@RohitJadhav-lk7bv 7 жыл бұрын
Hi sir I have done lot of surfing on KZbin but there no any valuable video for design patterns. Please do it.
@prachipandya129
@prachipandya129 8 жыл бұрын
sir we are making mt in MyThread class as static .But if don't make it static then also program runs well. generally we can make property as static becoz all objects of same class can share it so here the same reason is applicable or there is some another reason for making mt property as static???
@shambochoudhuri3039
@shambochoudhuri3039 8 жыл бұрын
Here we make variable mt as static to assign that variable with main thread object from ThreadDemo1 class..And as we know that static variables can be accessed by its class name within a static method.
@christylivefree
@christylivefree 7 жыл бұрын
A static variable is used where we want to use it without first creating an object of that class. Sharing of the same variable with all classes of the object is a side effect. If we reference a non static variable from a static method (say main), we will get a compile time error liek ThreadJoinMethod.java:19: error: non-static variable mt cannot be referenced from a static context MyThread.mt = Thread.currentThread(); ^ 1 error class MyThread extends Thread { Thread mt; public void run() { try { mt.join(); } catch (InterruptedException e) { e.printStackTrace(); } for(int i = 0; i < 10; i++) { System.out.println(i + ": Child Thread"); } } } public class ThreadJoinMethod { public static void main(String[] args) throws InterruptedException { MyThread.mt = Thread.currentThread(); MyThread t = new MyThread(); t.start(); for(int i = 0; i < 10; i++) { System.out.println(i + ": Main Thread"); t.sleep(2000); } } } I am not sure how you were able to run the code. Can you please share your code?
@AnIndianify
@AnIndianify 5 жыл бұрын
@@christylivefree Sharing of the same variable with all classes of the object is a side effect, Its not the side effect its the desired behavior that we want for that particular variable or method, and this case also we want all the child thread objects from the main class to share the same parent class thread object so it makes sense to create mt as a static variable. For your code to run first you will have to create an object MyThread t = new MyThread(); and then assign t.mt = Thread.currentThread();
@farzanajutt8110
@farzanajutt8110 2 жыл бұрын
Best best
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 2 жыл бұрын
Hello Friend. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@amargupta1728
@amargupta1728 4 жыл бұрын
At 1:25:00, which movie name you are discussing?
@amargupta1728
@amargupta1728 4 жыл бұрын
please share...
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@SagarKumar-dy4wp
@SagarKumar-dy4wp 6 жыл бұрын
Sir u told in the beginning that child thread doesnot have parent refrence by default...but there is a doubt by default child should have parent properties... Inheritance property
@himanshughai3708
@himanshughai3708 7 жыл бұрын
is there a class for mainthread also which extends Thread class because in that case only upcasting can be performed?upcasting:-storing mainthread object RID in Thread class object.
@amargupta1728
@amargupta1728 4 жыл бұрын
At 1:24:12, We are not able to see the actual output of Interrupted exception
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello APG. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@safvanp1680
@safvanp1680 2 жыл бұрын
👏
@chessmaniac2136
@chessmaniac2136 4 жыл бұрын
1:24:26 why end of main not printed
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@mrrawat215
@mrrawat215 6 жыл бұрын
Sir if a thread interrupt another thread if a thread execute interrupted() method then why we are handling IE in sleep or join because there we won't call interrupted() method.
@sanjaykumar-vx2eo
@sanjaykumar-vx2eo 4 жыл бұрын
throws InternetExplorer :D
@deeproy7292
@deeproy7292 7 жыл бұрын
is it really necessary to take the thread attribute as a static type in the MyThread class?
@dagaprerna
@dagaprerna 7 жыл бұрын
Thank you, Sir !
@parasasreekanth7199
@parasasreekanth7199 9 жыл бұрын
sir u r so great plz upload remaning videous of MLT 10 to 13
@krishgupta6554
@krishgupta6554 7 жыл бұрын
sir, i have a doubt about thread interruption...can the interrupt method be implicitly called during execution of program without calling it in main method....??????
@suman5492
@suman5492 8 жыл бұрын
Sir can you please explain the reason why the output is always like - End of main I am lazy thread I got interrupted in the program where you used the interrupt() method first time? I mean the output may be like - I am lazy thread I got interrupted End of main..... please help!
@avinashmolleti8249
@avinashmolleti8249 8 жыл бұрын
Hi Suman, As Durga sir mentioned in this video, interrupt will be taken care by JVM and Main Thread will go forward with its process. Hope the answer helps you :)
@vishalaggarwal1573
@vishalaggarwal1573 8 жыл бұрын
suman try this one public static void main(String args[]) throws InterruptedException{ MyThread t = new MyThread(); t.start(); t.interrupt(); Thread.sleep(5000); System.out.println("main"); } } class MyThread extends Thread{ public void run(){ try{ System.out.println("child"); Thread.sleep(2000); } catch(InterruptedException e){ System.out.println("interrupt"); } } } so output may differ
@christylivefree
@christylivefree 7 жыл бұрын
If you remember earlier classes, we know that there is no guarantee which thread the ThreadSchedular allots first. It can be either main or child. In this case it was allotted to main. I think there is a chance where you may see I am lazy thread I got interrupted End of main I ran it multiple times but couldn't see it. There is a slight chance it might happen.
@harendrasinha373
@harendrasinha373 6 жыл бұрын
Hello Sir, Suppose a thread is calling yield method then is it possible that this thread can throw InterruptedException ?
@akshaynerekar3514
@akshaynerekar3514 6 жыл бұрын
Can you please upload videos of Kotlin features? I am using it in my work and find some concepts difficult to understand
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Captain Sparrow. For Kotlin Features videos, Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627,7207212427/28
@sohilsodhiya5684
@sohilsodhiya5684 4 жыл бұрын
interrupt method is final as well.You missed final keyword. "public final void interrupt()"
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Sohil. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@ishankgupta8560
@ishankgupta8560 5 жыл бұрын
Why we called Thread.sleep() instead of Thread.currentThread().sleep() in main class is both method represent same thread object?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Ishank. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@saeednazary3111
@saeednazary3111 5 жыл бұрын
EXELLENTT
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Saeed. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@AbhishekSharma-uh8pb
@AbhishekSharma-uh8pb 3 жыл бұрын
what is the diff between sleep or wait sir ?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Abhishek. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@UpendraSingh-qx5uh
@UpendraSingh-qx5uh 2 жыл бұрын
waiting is because of join() method and sleeping is because of sleep() method
@gulshankumar1063
@gulshankumar1063 4 жыл бұрын
is this video valid in 2020. or something change in jvm. that's why may be some other concept include in it. During Lockdown over country i saw your various videos it's really very good to understand the basic concept to high level. Thanku So much Sir. Some time you speak telgu it's not get... to me.
@RohitGupta-kf6nf
@RohitGupta-kf6nf 3 жыл бұрын
I have doubt here.. i saw in Oracle document. sleep(long milli) method is not native method... is Anyone notice it?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Rohit. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@Rkreddy123
@Rkreddy123 Жыл бұрын
28:00,55:30
@hungry_hyena
@hungry_hyena 8 жыл бұрын
Sir your videos are worth to watch. One candid suggestion I want to put here; you waste a lot of time over worthless stories and repeating a statement multiple time. You should focus on concepts only. It can save lot of time and students or experienced techies can learn more things from your videos.
@codedigestwithmrwallet4768
@codedigestwithmrwallet4768 7 жыл бұрын
These videos are for classroom students uploaded over internet for info. And for classroom info its must to follow stories and anecdotes else students.sleep() will happen. And for repeating part i also was utterly annoyed even wrote a comment on inner c;lass tutorial but later reliazes he do that for class students to write notes. So for all youtube viewrs i say watch this at 1.5X speed and when he starts repeating forward by like 5min. And you are golden. :)
@9985614083
@9985614083 6 жыл бұрын
you are absolutely right. But I watch his videos on 1.75x or 2x. You can try once :)
@zeusnn
@zeusnn 4 жыл бұрын
Are these same? Thread.getCurrentThread().join(1000) and Thread.sleep(1000)
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Naveen. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@ketulpatel1422
@ketulpatel1422 4 жыл бұрын
Hello sir, How can interpret main Thread ?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Ketul. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@ShubhamKumar-ej2oz
@ShubhamKumar-ej2oz 6 жыл бұрын
whoever is handling the camera, please focus the camera on the screen from top to bottom and don't leave the bottom part of the output unseen
@sheetaljain3569
@sheetaljain3569 4 жыл бұрын
Sir, I am getting one error which is that Thread cannot be converted into MyThread sir in this it is not converting main thread into MyThread.
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Sheetal. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@poojithaku822
@poojithaku822 4 жыл бұрын
I'm confused with which is child thread and main thread Mythread . Mt=thread.currentthread(); this is main thread know Thread.currntthread means main thread ... Soo will u pls help me??
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Poojitha. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@unknownuser-wr3zm
@unknownuser-wr3zm 4 жыл бұрын
public static void main (String [] arg) is main thread
@sonamsingh719
@sonamsingh719 8 жыл бұрын
why output is like ?? End of main I am lazy thread I got interrupted
@vishalaggarwal1573
@vishalaggarwal1573 8 жыл бұрын
sonam try this one public static void main(String args[]) throws InterruptedException{ MyThread t = new MyThread(); t.start(); t.interrupt(); Thread.sleep(5000); System.out.println("main"); } } class MyThread extends Thread{ public void run(){ try{ System.out.println("child"); Thread.sleep(2000); } catch(InterruptedException e){ System.out.println("interrupt"); } } } so output may differ
@christylivefree
@christylivefree 7 жыл бұрын
If you remember earlier classes, we know that there is no guarantee which thread the ThreadSchedular allots first. It can be either main or child. In this case it was allotted to main. I think there is a chance where you may see I am lazy thread I got interrupted End of main I ran it multiple times but couldn't see it. There is a slight chance it might happen.
@swaroop6044
@swaroop6044 4 жыл бұрын
@@christylivefree I tried it on Eclipse, had run more than 15 times and i encountered this output. i had the same doubt.
@tadiyal04
@tadiyal04 8 жыл бұрын
this code run main method first than child thread without using any static variable.
@krishgupta6554
@krishgupta6554 7 жыл бұрын
because child thread is not yet started ..and we can't expect any output..you are calling join method before starting it..
@prabhudeepsingh4236
@prabhudeepsingh4236 7 жыл бұрын
To get all the programs of Multi Threading give a star to the following repository: github.com/PrabhudeepSingh/Java-07-MultiThreading Follow github.com/PrabhudeepSingh for more such code.
@akashsrivastava8226
@akashsrivastava8226 6 жыл бұрын
Why another method is implemented in Java while first one is not ?? Kindly help !!
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Akash. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@jigneshkhunt1927
@jigneshkhunt1927 9 жыл бұрын
pls upload more and more
@rangaswamymaddileti9751
@rangaswamymaddileti9751 Жыл бұрын
54:55
@shibadhamija4305
@shibadhamija4305 7 жыл бұрын
sir , in the main thread statement s.o.pln("end of main thread never got printed ").....but why?? please help
@deeproy7292
@deeproy7292 7 жыл бұрын
it got printed...right at the first...play the video in 0.25x and see
Core Java with OCJP/SCJP: Multi Threading Part-7 || synchronization part-1
1:35:15
Durga Software Solutions
Рет қаралды 404 М.
Core Java with OCJP/SCJP: Multi Threading Part-10 || Inter Thread Communication Part-1
1:18:26
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
Core Java with OCJP/SCJP: Multi Threading Part-3 || The ways of defining a Thread Part-2
1:18:54
Core Java With OCJP/SCJP: Collections Part-2 || 9key interfaces
1:31:50
Durga Software Solutions
Рет қаралды 399 М.
Learn Java in 15 Minutes (seriously)
19:50
ForrestKnight
Рет қаралды 150 М.
10 Худших мотоциклов
8:19
LANKARRA
Рет қаралды 727 М.
Core Java with OCJP/SCJP: Multi Threading Part-1 || Introduction
1:00:20
Durga Software Solutions
Рет қаралды 1 МЛН
Core Java With OCJP/SCJP: Collections Part-8 || TreeSet
1:16:30
Durga Software Solutions
Рет қаралды 208 М.