can somebody explain why only one method at a time can be active within each thread running in JVM? Why not two or three, but only one?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Each thread runs code synchronously. A thread is only given more work to do once it has finished it’s current allocation of work.
As to why there can only be one method ‘active’ at a time, a method can call other methods or return. Once a method has returned, it is obviously no longer active, similarly, once a method calls another, the called method becomes the active one.