It is not about the sequence. Consider these as two different programs.
My question is if I am passing the Runnable job to class A (Thread), still it is not executing it class B.
If I dont override run in class A , both line will print B.?
The important thing is not to stop questioning.Curiosity has its own reason for existing.
Vijay Tidake wrote:
My question is if I am passing the Runnable job to class A (Thread), still it is not executing it class B.
It is the run() method of the Thread class that calls the run() method of the Runnable that is passed via the constructor. So, if you try to *both* pass a Runnable and override the run() method, then the latter will execute.