enthuware.ocpjp.v11.2.1235

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
Pugalendi
Posts: 1
Joined: Thu Apr 21, 2022 7:59 am
Contact:

enthuware.ocpjp.v11.2.1235

Post by Pugalendi »

I really do not understand the answer.
Q 5 of 19 (Concurrency)- enthuware.ocpjp.v11.2.1235
You want to execute a task that returns a result without blocking. Which of the following types from java.util.concurrent package will be required to achieve this?
Valid answers: ExecutorService, Executors, Callable, Future.

How Runnable is a bad answer?
Is Future get() doesn't block?

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: enthuware.ocpjp.v11.2.1235

Post by admin »

1. Runnable is not in java.util.concurrent package
2. Its run method returns void.

3. Callable's call method returns immediately.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 38 guests