I have found that to this method passed
PrivilegedExceptionAction
This object has method run()
. Does it mean that will be created separate thread for executing? Please part of code that create this thread if yes. I didn't find it.
I have found that to this method passed
PrivilegedExceptionAction
This object has method run()
. Does it mean that will be created separate thread for executing? Please part of code that create this thread if yes. I didn't find it.
I think maybe this is your answer from SCJP Book:
The overloaded run(String s) method will be ignored by the Thread class unless you call it yourself. The Thread class expects a run() method with no arguments, and it will execute this method for you in a separate call stack after the thread has been started. With a run(String s) method, the Thread class won't call the method for you, and even if you call the method directly yourself, execution won't happen in a new thread of execution with a separate call stack. It will just happen in the same call stack as the code that you made the call from, just like any other normal method call.