Java Multithreading Interview Questions

  Рет қаралды 328,023

in28minutes

in28minutes

Күн бұрын

Пікірлер: 54
@pankajdubey1310
@pankajdubey1310 6 жыл бұрын
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.
@AlguienEnSuCasa
@AlguienEnSuCasa 3 жыл бұрын
Because objects are reference pointers to memory structures, potentially shared, while primitives are "values"
@shantipriya3088
@shantipriya3088 2 жыл бұрын
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-vs7se
@annukumari-vs7se 4 жыл бұрын
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.
@rkgoli
@rkgoli 7 жыл бұрын
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.
@sivaramasubramanian4245
@sivaramasubramanian4245 3 жыл бұрын
Wow..Amazing Tutorial..Clear, covers a lot yet concise enough!
@aquasaiyan7877
@aquasaiyan7877 4 жыл бұрын
great video. if i'm not mistaken, Future object would be derived from callable instead of runnable
@arvindraju1990
@arvindraju1990 5 жыл бұрын
Where we can find your generics exercises code which you mentioned in Video? on GIT HUB?
@meetshah5287
@meetshah5287 3 жыл бұрын
Great Content, Can say that this video cleared my all doubts and all topics are clear now.
@jackcoolguy123
@jackcoolguy123 2 жыл бұрын
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
@MathLab4u
@MathLab4u 4 жыл бұрын
I am 100% impressed
@prasadrayudu2001
@prasadrayudu2001 6 жыл бұрын
Really Helpful video Sir,Thank You :)
@akhilkapoor5127
@akhilkapoor5127 4 жыл бұрын
Amazing example
@sreeram543
@sreeram543 3 жыл бұрын
Excellent
@iDeveloper92
@iDeveloper92 Жыл бұрын
Well done!
@FeelGoodChronicles
@FeelGoodChronicles Жыл бұрын
Thanks sir!!!!!!!!!!!!!!!!
@SS-or2om
@SS-or2om 3 жыл бұрын
Where we can find these documents? Please share the link.
@vikrantdheer8817
@vikrantdheer8817 6 жыл бұрын
Where we can find your multithreading & generics exercises code ?
@sekhar2379
@sekhar2379 3 жыл бұрын
great video
@moksudahmed3040
@moksudahmed3040 8 жыл бұрын
Why the Thread that will provide us the bowling statistics is called "battingThread2" ? Shouldn't we call it "bowlingThread"?
@PramendraRaghuwanshi
@PramendraRaghuwanshi 7 жыл бұрын
It's just naming convention, you can give whatever you want. BTW best practice we should have "bowlingThread" as you suggested.
@pankajdubey1310
@pankajdubey1310 6 жыл бұрын
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_nishant
@hit_nishant 5 жыл бұрын
What if we will commented out the notify() from the Calculator class ?
@achyuthsai6339
@achyuthsai6339 4 жыл бұрын
then main method continues to wait infinitly eventhough another thread is completed and thread.sum will never be executed
@Govindyatnalkar
@Govindyatnalkar 4 жыл бұрын
This is gold!!!
@csabadanyiko6096
@csabadanyiko6096 2 жыл бұрын
"Threads allow java code to run in parallel". That is not true. Parallelism is not guaranteed in java multithreading. Only concurrency.
@phoenix3525
@phoenix3525 6 жыл бұрын
Well done.
@PraveenKumar-ew2xo
@PraveenKumar-ew2xo 7 жыл бұрын
Can u provide this PDF link ?
@dhrub6
@dhrub6 8 жыл бұрын
Very well explained in detail. Where can I get the source code?
@johncanessa2250
@johncanessa2250 7 жыл бұрын
I found it at: github.com/in28minutes/JavaInterviewQuestionsAndAnswers
@HindustaniShare
@HindustaniShare 3 жыл бұрын
@@johncanessa2250 this link dosent work for me 😔
@batoolazzam3985
@batoolazzam3985 6 ай бұрын
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
@jiansenxmu
@jiansenxmu 5 жыл бұрын
Thanks a lot!
@pulpopulpo5383
@pulpopulpo5383 6 жыл бұрын
Where can we donwload a complete pdf or ppt file with all the explanations of each question?
@neerajarora100
@neerajarora100 6 жыл бұрын
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 ...
@umeshnaik844
@umeshnaik844 7 жыл бұрын
One big question why wait and notify methods in object class not in thread class?
@LovyGupta007
@LovyGupta007 6 жыл бұрын
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.
@soumyababu7692
@soumyababu7692 6 жыл бұрын
source code of the eg?
@anirbanroy1524
@anirbanroy1524 6 жыл бұрын
Excellent video
@murtuzalaxmidhar9792
@murtuzalaxmidhar9792 5 жыл бұрын
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.
@jaydipbarvaliya
@jaydipbarvaliya 4 жыл бұрын
People starting complaining about video..... they don't know that Video title is Interview questions and ans.
@shubhamthakur3575
@shubhamthakur3575 5 жыл бұрын
@21:45 you have called wait method as Thread.wait(); which is incorrect wait method belongs to Object class not to Thread class
@alokyadav9684
@alokyadav9684 6 жыл бұрын
Tysm
@TheRouteShow
@TheRouteShow 2 жыл бұрын
wow
@analogylibrary
@analogylibrary 6 жыл бұрын
From where can I get the full document which you are going through in the video?
@Lucasevsky85
@Lucasevsky85 6 жыл бұрын
He does courses on Udemy , I got a few for discounted price and they are very good :)
@krishnashauzshenikala9240
@krishnashauzshenikala9240 5 жыл бұрын
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
@LimeObeans
@LimeObeans 5 жыл бұрын
Hi I was 70k th sub can I win prize? I like your videos thanks!
@curious_sapien
@curious_sapien 5 жыл бұрын
What prize you wanna win?
@clvaclva
@clvaclva 4 жыл бұрын
moving screen up and down is very annoying. need to focus on presentation more
@DevendraKumar-hc7qm
@DevendraKumar-hc7qm 5 жыл бұрын
Exaplaination is not good
@arvindraju1990
@arvindraju1990 5 жыл бұрын
Where we can find your generics exercises code which you mentioned in Video? on GIT HUB?
@rionacko748
@rionacko748 3 жыл бұрын
yeah
Java Exception Handling Interview Questions and Answers
32:21
in28minutes
Рет қаралды 92 М.
Мама у нас строгая
00:20
VAVAN
Рет қаралды 12 МЛН
I was just passing by
00:10
Artem Ivashin
Рет қаралды 18 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 19 МЛН
Java Collections Interview Questions and Answers -  New Version
43:51
Handle 1,000,000 Threads with Java and Spring Boot !!!
21:50
Daily Code Buffer
Рет қаралды 28 М.
FANG Interview Question | Process vs Thread
3:51
ByteByteGo
Рет қаралды 348 М.
Java threads 🧵
16:01
Bro Code
Рет қаралды 122 М.
Java ExecutorService - Part 1 - Introduction
10:12
Defog Tech
Рет қаралды 423 М.
Multithreading in Java Explained in 10 Minutes
10:01
Coding with John
Рет қаралды 970 М.
Мама у нас строгая
00:20
VAVAN
Рет қаралды 12 МЛН