Exam 1z0-809 All QuestionsBrowse all questions from this exam
Question 113

Given the code fragments:

and

What is the result?

    Correct Answer: C

    The provided code creates an ExecutorService to run tasks concurrently. It defines two classes: R, which implements Runnable, and C, which implements Callable<String>. The code uses `es.execute(new R())` to run an instance of R, which prints 'Run...'. Next, it uses `es.submit(new C())` to run an instance of C, which returns 'Call...' and prints it out using `System.out.println(f1.get())`. Assuming exceptions are properly handled as implied in the code snippets, the output is 'Run... Call...'.

Discussion
Svetleto13Option: C

If we add exceptions to main method answer is C.

DarGrinOption: D

We don't have informatione, if exception ist handeld or not. That's why is the answer D.

asdfjhfgjuaDCVOption: C

C is the answer

steefaandOption: C

C is correct. Since code snippet is given assume that exceptions are properly handled.

steefaandOption: C

C is correct. Since code snippet is given assume that exceptions are properly handled.

samtash1034Option: C

C,tested

Sofia_ShireenOption: B

Answer is B,tested