About Question enthuware.ocpjp.v7.2.1254 :
Posted: Sat Jan 07, 2017 12:29 pm
How is "None of the above are correct" the correct answer if even the explanation says that:
Also the explanation for answer 1
Maybe I am missunderstanding the "To provide threading behavior" statement...
Thanks
Aleks
As far as I understand you have to call the start() method on a Thread object to have a parall execution. This makes anser 1 correct for me.A Thread is created by doing new ClassThatExtendsThread() OR by doing new Thread(classImplementingRunnable);
The newly created Thread is started by calling start().
Also the explanation for answer 1
does not make sense, because, if you call the run method of the Runnable it will be executed in the main thread.The class can also implement Runnable.
Maybe I am missunderstanding the "To provide threading behavior" statement...
Thanks
Aleks