The thread stack also contains all local variables for each method being executed (all methods on the call stack). A thread can only access it's own thread stack. Local variables created by a thread are invisible to all other threads than the thread who created it. Even if two threads are executing the exact same code, the two threads will still create the local variables of that code in each their own thread stack. Thus, each thread has its own version of each local variable. All local variables of primitive types (boolean, byte, short, char, int, long,float, double) are fully stored on the thread stack and are thus not visible to other threads. One thread may pass a copy of a pritimive variable to another thread, but it cannot share the primitive local variable itself.
@AlguienEnSuCasa3 жыл бұрын
Because objects are reference pointers to memory structures, potentially shared, while primitives are "values"
@shantipriya30882 жыл бұрын
The canteen has two windows for rice. (window 1 and window 2), each window has a master to provide meal service, and the window service time is as follows. Master a of window 1 is preferred to start the service. After cooking for three students, open window 2 and master B of window 2 starts the service. The total number of students is 30. Please describe the code implementation with multithreading mechanism. who can solve it?
@annukumari-vs7se4 жыл бұрын
Asynchronous execution mechanism is defined wrong in the yellow highlighted box as it’s not capable of running in background but asynchronous means not waiting for the other thread to complete and execute simultaneously.
@rkgoli7 жыл бұрын
good job man. nice brief summarisation and good articulation than lot of other multithreading videos, which are either too verbose, or too slow, or too digressing with not-that-straight examples, or not articulated well enough. Thanks a lot!! for the free service.
@sivaramasubramanian42453 жыл бұрын
Wow..Amazing Tutorial..Clear, covers a lot yet concise enough!
@aquasaiyan78774 жыл бұрын
great video. if i'm not mistaken, Future object would be derived from callable instead of runnable
@arvindraju19905 жыл бұрын
Where we can find your generics exercises code which you mentioned in Video? on GIT HUB?
@meetshah52873 жыл бұрын
Great Content, Can say that this video cleared my all doubts and all topics are clear now.
@jackcoolguy1232 жыл бұрын
I think your last example explanation is not correct. Thread.wait() is not used when you want to wait the completion of that thread but you use it on any object (not only thread) whose lock thread needs to give up so that other thread can lock it and then again acquire it back to complete the rest of the part. If you want to continue execution of thread after completion of other thread, then you need to use join() on that thread
@MathLab4u4 жыл бұрын
I am 100% impressed
@prasadrayudu20016 жыл бұрын
Really Helpful video Sir,Thank You :)
@akhilkapoor51274 жыл бұрын
Amazing example
@sreeram5433 жыл бұрын
Excellent
@iDeveloper92 Жыл бұрын
Well done!
@FeelGoodChronicles Жыл бұрын
Thanks sir!!!!!!!!!!!!!!!!
@SS-or2om3 жыл бұрын
Where we can find these documents? Please share the link.
@vikrantdheer88176 жыл бұрын
Where we can find your multithreading & generics exercises code ?
@sekhar23793 жыл бұрын
great video
@moksudahmed30408 жыл бұрын
Why the Thread that will provide us the bowling statistics is called "battingThread2" ? Shouldn't we call it "bowlingThread"?
@PramendraRaghuwanshi7 жыл бұрын
It's just naming convention, you can give whatever you want. BTW best practice we should have "bowlingThread" as you suggested.
@pankajdubey13106 жыл бұрын
how two thread can override the method argument value,every thread have own stack and method argument and local variable is maintained in the stack, can you please provide example and demonstrate, two thread can overide the local variable and share in between
@hit_nishant5 жыл бұрын
What if we will commented out the notify() from the Calculator class ?
@achyuthsai63394 жыл бұрын
then main method continues to wait infinitly eventhough another thread is completed and thread.sum will never be executed
@Govindyatnalkar4 жыл бұрын
This is gold!!!
@csabadanyiko60962 жыл бұрын
"Threads allow java code to run in parallel". That is not true. Parallelism is not guaranteed in java multithreading. Only concurrency.
@phoenix35256 жыл бұрын
Well done.
@PraveenKumar-ew2xo7 жыл бұрын
Can u provide this PDF link ?
@dhrub68 жыл бұрын
Very well explained in detail. Where can I get the source code?
@johncanessa22507 жыл бұрын
I found it at: github.com/in28minutes/JavaInterviewQuestionsAndAnswers
@HindustaniShare3 жыл бұрын
@@johncanessa2250 this link dosent work for me 😔
@batoolazzam39856 ай бұрын
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
@jiansenxmu5 жыл бұрын
Thanks a lot!
@pulpopulpo53836 жыл бұрын
Where can we donwload a complete pdf or ppt file with all the explanations of each question?
@neerajarora1006 жыл бұрын
The last example the wait and notify are called by locking on different object.. not a good practice as you may miss a signal !! Also in the last example you could have simply used join. Not an amazing example to show wait and notify ...
@umeshnaik8447 жыл бұрын
One big question why wait and notify methods in object class not in thread class?
@LovyGupta0076 жыл бұрын
communication will be a big problem in that case. For ex while notifying you need to know all the threads who are waiting and call method on each of them. Object helps in that sort of communication.
@soumyababu76926 жыл бұрын
source code of the eg?
@anirbanroy15246 жыл бұрын
Excellent video
@murtuzalaxmidhar97925 жыл бұрын
Very short explanations with no significant terminologies used. Its okay to keep it brief but should highlight important aspects else it not much of a use. Felt same with Design Pattern videos.
@jaydipbarvaliya4 жыл бұрын
People starting complaining about video..... they don't know that Video title is Interview questions and ans.
@shubhamthakur35755 жыл бұрын
@21:45 you have called wait method as Thread.wait(); which is incorrect wait method belongs to Object class not to Thread class
@alokyadav96846 жыл бұрын
Tysm
@TheRouteShow2 жыл бұрын
wow
@analogylibrary6 жыл бұрын
From where can I get the full document which you are going through in the video?
@Lucasevsky856 жыл бұрын
He does courses on Udemy , I got a few for discounted price and they are very good :)
@krishnashauzshenikala92405 жыл бұрын
Voice not good sir.use indian English and in udemy plese provide along with your bord explanation video.not always eclipse focus on camera not good.and plese tell clarify sir.clarfication not reached
@LimeObeans5 жыл бұрын
Hi I was 70k th sub can I win prize? I like your videos thanks!
@curious_sapien5 жыл бұрын
What prize you wanna win?
@clvaclva4 жыл бұрын
moving screen up and down is very annoying. need to focus on presentation more
@DevendraKumar-hc7qm5 жыл бұрын
Exaplaination is not good
@arvindraju19905 жыл бұрын
Where we can find your generics exercises code which you mentioned in Video? on GIT HUB?