Vcehome > Oracle > Oracle Java > 1Z0-815 > 1Z0-815 Online Practice Questions and Answers

1Z0-815 Online Practice Questions and Answers

Questions 4

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

Browse 95 Q&As
Questions 5

Given:

Which two allow a.Main to allocate a new Person? (Choose two.)

A. In Line 1, change the access modifier to private private Person() {

B. In Line 1, change the access modifier to public public Person() {

C. In Line 2, add extends Person to the Main class public class Main extends Person { and change Line 3 to create a new Main object Person person = new Main();

D. In Line 2, change the access modifier to protected protected class Main {

E. In Line 1, remove the access modifier Person() {

Browse 95 Q&As
Questions 6

Which two statements are true about Java modules? (Choose two.)

A. Modular jars loaded from --module-path are automatic modules.

B. Any named module can directly access all classes in an automatic module.

C. Classes found in –classpath are part of an unnamed module.

D. Modular jars loaded from –classpath are automatic modules.

E. If a package is defined in both the named module and the unnamed module, then the package in the unnamed module is ignored.

Browse 95 Q&As
Questions 7

Given: What is the expected result of javac?

A. javac fails to compile the class and prints the error message, C:\workspace4\Mycar.java:1:error: package java does not exist

B. javac compiles Mycar.java without errors or warnings.

C. javac fails to compile the class and prints the error message, C:\workspace4\Mycar.java:1:error: expected import java.lang

D. javac fails to compile the class and prints the error message, Error: Could not find or load main class Mycar.class

Browse 95 Q&As
Questions 8

Given:

executed using command: java Hello "Hello World" Hello World What is the output?

A. An exception is thrown at runtime.

B. Hello WorldHello World

C. Hello World Hello World

D. Hello WorldHelloWorld

E. HelloHello WorldHelloWorld

Browse 95 Q&As
Questions 9

Given: What is the result?

A. 2134

B. 2143

C. 214

D. 234

Browse 95 Q&As
Questions 10

Which two statements are correct about modules in Java? (Choose two.)

A. java.base exports all of the Java platforms core packages.

B. module-info.java can be placed in any folder inside module-path.

C. A module must be declared in module-info.java file.

D. module-info.java cannot be empty.

E. By default, modules can access each other as long as they run in the same folder.

Browse 95 Q&As
Questions 11

Given:

What is the result?

A. b1

B. 2

C. b2

D. 1

E. b3

F. 3

G. The compilation fails due to an error in line 1.

Browse 95 Q&As
Questions 12

Given:

What is the type of x?

A. char

B. List

C. String

D. List

Browse 95 Q&As
Questions 13

Given the code fragment:

What is the output?

A. The compilation fails.

B. [-1, -2, -3]

C. [-3, -2, -1]

D. A runtime exception is thrown.

Browse 95 Q&As
Exam Code: 1Z0-815
Exam Name: Java SE 11 Programmer I
Last Update: May 07, 2024
Questions: 95 Q&As

PDF

$49.99

VCE

$59.99

PDF + VCE

$67.99