Weekend Sale 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sale65best

Free Oracle 1z0-811 Practice Exam with Questions & Answers

Questions 1

Which package would you import to use the Random class?

Options:
A.

java.io

B.

java.math

C.

java.util

D.

java.lang

Oracle 1z0-811 Premium Access
Questions 2

Given:

1z0-811 Question 2

What is the result?

Options:
A.

A compilation error occurs in the modify method.

B.

99

C.

5

D.

A compilation error occurs in the main method.

Questions 3

Given:

1z0-811 Question 3

What is the result?

Options:
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.

Questions 4

Given the code fragment:

1z0-811 Question 4

What is the result?

Options:
A.

456789

B.

4567889

C.

45678

D.

3456789

Questions 5

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

Options:
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.

Questions 6

Given the code fragment:

1z0-811 Question 6

What is the result?

Options:
A.

Unknown issues.

Invalid divisor.

B.

Unknown issues.

C.

Invalid divisor.

D.

A compilation error occurs.

Questions 7

Given the code fragment:

1z0-811 Question 7

What is the result?

Options:
A.

lotus jasmine

B.

lotus

C.

A compilation error occurs.

D.

lotus lily

Questions 8

Given these class definitions:

1z0-811 Question 8

Which class or classes compile?

Options:
A.

only MyClassB, MyClassC, and MyClassD

B.

only MyClassB

C.

MyClassA, MyClassB, MyClassC, and MyClassD

D.

only MyClassB and MyClassD

Questions 9

Which statement is true about primitive variables?

Options:
A.

They can be compared with the == operator.

B.

They can be compared with the equals method only.

C.

They cannot be compared.

D.

They can be compared with the compareTo method only.

Questions 10

What is the meaning of “write once, run anywhere” in Java?

Options:
A.

Java programs are designed to run only in web browsers and, thus, can run wherever there is a browser.

B.

It is a marketing statement because Java programs must be compiled for a specific platform in order to run.

C.

Java programs can run on any Java Virtual Machine without being recompiled.

D.

Java programs, after being compiled, can run on any platform or device even without a Java Virtual Machine.

Exam Code: 1z0-811
Certification Provider: Oracle
Exam Name: Java Foundations
Last Update: Jul 19, 2025
Questions: 75
PDF + Testing Engine
$164.99
$57.75
Testing Engine
$124.99
$43.75
PDF (Q&A)
$104.99
$36.75