Exit demo 1Z0-815 Java SE 11 Programmer I PDF format · free preview

Oracle 1Z0-815 - Questions & Answers

Free preview · every answer includes a full explanation

Product page: https://prepkeys.com/1z0-815.html

Question 1
Single choice

Given:

What is the result?

A.

nothing

B.

It fails to compile.

C.

0

D.

A java.lang.IllegalArgumentException is thrown.

E.

10

Question 2
Multiple choice

Given:

Which two changes need to be made to make this class compile? (Choose two.)

A.

Change Line 1 to an abstract class:
public abstract class API {

B.

Change Line 2 access modifier to protected:
protected void checkValue(Object value)
throws IllegalArgumentException;

C.

Change Line 1 to a class:
public class API {

D.

Change Line 1 to extend java.lang.AutoCloseable:
public interface API extends AutoCloseable {

E.

Change Line 2 to an abstract method:
public abstract void checkValue(Object value)
throws IllegalArgumentException;

Question 3
Multiple choice

Which two modules include APIs in the Java SE Specification? (Choose two.)

A.

java.logging

B.

java.desktop

C.

javafx

D.

jdk.httpserver

E.

jdk.jartool

Question 4
Single choice

Given:

What is the output?

A.

300

B.

Exception

C.

200

D.

100

Question 5
Multiple choice

Which two statements are true about the modular JDK? (Choose two.)

A.

The foundational APIs of the Java SE Platform are found in the java.base module.

B.

An application must be structured as modules in order to run on the modular JDK.

C.

It is possible but undesirable to configure modules' exports from the command line.

D.

APIs are deprecated more aggressively because the JDK has been modularized.

Question 6
Single choice

Given the code fragment:

What is the result?

A.

-1 : 2

B.

2 : -1

C.

2 : 3

D.

3 : 0

Question 7
Single choice

Given:

What is the result?

A.

The compilation fails.

B.

abdf

C.

abd

D.

adf

E.

abcd

Question 8
Single choice

Which set of commands is necessary to create and run a custom runtime image from Java source files?

A.

java, jdeps

B.

javac, jlink

C.

jar, jlink

D.

javac, jar

Question 9
Single choice

Given:

What is the result?

A.

4

B.

3

C.

An exception is thrown at runtime.

D.

5

Question 10
Single choice

Given:

It is required that if p instanceof Pair then p.isValid() returns true.

Which is the smallest set of visibility changes to insure this requirement is met?

A.

setLeft and setRight must be protected.

B.

left and right must be private.

C.

isValid must be public.

D.

left, right, setLeft, and setRight must be private.

Showing 10 of 95 questions · Unlock the full set