Certbus > Oracle > Oracle Java > 1Z0-811 > 1Z0-811 Online Practice Questions and Answers

1Z0-811 Online Practice Questions and Answers

Questions 4

Given the code fragment:

What is the result?

A. pen pencil erasers paper

B. paper pen pencil erasers

C. A compilation error occurs.

D. A runtime exception is thrown.

Browse 75 Q&As
Questions 5

Given:

What is the result?

A. [null:-]

B. [ : ]

C. [null:null]

D. [:null]

Browse 75 Q&As
Questions 6

Which two Java reserved words are used to implement encapsulation?

A. final

B. static

C. public

D. extends

E. private

Browse 75 Q&As
Questions 7

Which two statements are true about the Java Runtime Environment (JRE)?

A. It is responsible for garbage collection.

B. It interprets bytecode stored in a .class file.

C. It contains the JDK and Java APIs.

D. It is platform independent.

E. You must install the JRE to compile a .java file.

Browse 75 Q&As
Questions 8

Given the code fragment: What is the result?

A. Selected null flavor.

B. Selected Chocolate flavor.

C. An ArrayIndexOutofBoundsException is thrown at run time.

D. Selected Chocolate flavor. Thank you!

Browse 75 Q&As
Questions 9

Given the code fragment:

What is the result?

A. false false false false

B. true false false false

C. true true true true

D. true true true false

Browse 75 Q&As
Questions 10

Given the code fragment:

Which statement is true?

A. A compilation error occurs at line 5.

B. A compilation error occurs at line 3.

C. The code compiles without errors.

D. A compilation error occurs at line 7.

Browse 75 Q&As
Questions 11

Given:

What is the result?

A. A compilation error occurs in the modify method.

B. 99

C. 5

D. A compilation error occurs in the main method.

Browse 75 Q&As
Questions 12

Given:

What is the result?

A. Compilation fails. To make it compile, replace line n1 with var1 = 0;

B. Compilation fails. To make it compile, replace line n2 with var2 = 0;

C. 0

D. Nothing is printed.

Browse 75 Q&As
Questions 13

Given the code fragment:

What is the result?

A. 25.67

B. 25.00

C. 25.7

D. 26

Browse 75 Q&As
Questions 14

Given the code fragment: What is the result?

A. false true

B. true true

C. false false

D. A runtime exception is thrown

Browse 75 Q&As
Questions 15

Given the code fragment:

What is the result?

A. A compilation error occurs at line n1.

B. Jack

C. The program prints either Jack or Queen.

D. Queen

Browse 75 Q&As
Questions 16

Which two components can class declarations include?

A. A list of instance methods

B. The main method

C. Interfaces implemented by the class

D. The public modifier

Browse 75 Q&As
Questions 17

Given:

What is the output?

A. 1 2 3 aaaa

B. 1 2 aaa

C. Compilation fails

D. a

Browse 75 Q&As
Questions 18

Given:

What is the result?

A. The program compiles and nothing is printed.

B. Iteration plus an increasing number is printed 100 times.

C. Iteration plus an increasing number is printed 99 times.

D. An error occurs during compilation.

Browse 75 Q&As
Exam Code: 1Z0-811
Exam Name: Java Foundations
Last Update: Apr 29, 2024
Questions: 75 Q&As

PDF

$45.99

VCE

$49.99

PDF + VCE

$59.99