Page 1 of 1

Re: About Question enthuware.ocpjp.v8.2.1496 :

Posted: Sun Dec 11, 2016 9:40 am
by uvsmtid
Minor suggestion...
What is/are the name(s) of the interface(s) that can be implemented by a class so that it can execute in a separate thread without using any other framework classes (except class Thread)?
Without "except class Thread" (or any other additional clarification for the matter) the question is ambiguous. If thread is just a concept, then class Thread belongs to "framework classes". Therefore, we always need class Thread (directly or indirectly - e.g. via ExecutorService) to run any code "in a separate thread". In other words, we cannot simply implement Runnable (correct answer) and "execute in a separate thread without using any other framework classes".

Re: About Question enthuware.ocpjp.v8.2.1496 :

Posted: Sun Dec 11, 2016 11:17 am
by admin
I see what you are saying but I do not completely agree with the statement that Thread class belongs to the "framework classes". By this logic, every java class belongs to "framework classes". I do agree that it could be a little bit ambiguous. I will leave this discussion here to get more feedback.

thank you,
Paul.

Re: About Question enthuware.ocpjp.v8.2.1496 :

Posted: Mon Jan 02, 2017 1:30 pm
by olograph
One can extend Thread and start it without using other classes. Runnable clearly rely on Thread. Please define framework classes? Which framework?

Re: About Question enthuware.ocpjp.v8.2.1496 :

Posted: Mon Sep 18, 2017 6:37 pm
by atrofimov
in original question (statement)
What is/are the name(s) of the interface(s) that can be implemented by a class so that it can execute in a separate thread without using any other framework classes
I got confused due with
can execute
instead of can be executed or could be executed... meaning "Executor" is valid answer - Executor, a simple interface that supports launching new tasks. (https://docs.oracle.com/javase/tutorial ... inter.html )

Re: About Question enthuware.ocpjp.v8.2.1496 :

Posted: Mon Sep 18, 2017 10:57 pm
by admin
An Executor is not a task. An Executor executes tasks that are submitted to it.

Re: About Question enthuware.ocpjp.v8.2.1496 :

Posted: Sun Dec 02, 2018 7:18 am
by ramon.carrascom
I totally agree with OP. This question is totally ambiguous. But... Oracle also is ambiguous in cert exams... :cry: