New Year Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

Free and Premium Oracle 1z0-811 Dumps Questions Answers

Page: 1 / 3
Total 75 questions

Java Foundations Questions and Answers

Question 1

Given the contents of the Test.java file:

What is the result?

Options:

A.

200 : 400

B.

A compilation error occurs at line n1.

C.

A compilation error occurs at line n2.

D.

100 : 400

Buy Now
Question 2

Given the code fragment:

What is the result?

Options:

A.

a memory address1 in hexadecimal number format

a memory address2 in hexadecimal number format

B.

10, 15

[10, 15]

C.

0, 10, 15

[10, 15, null]

D.

a memory address in hexadecimal number format

[10, 15]

Question 3

Given:

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.

Question 4

Given the code fragment:

What is the result?

Options:

A.

false false –1

B.

true false 0

C.

true true 0

D.

false true –1

Question 5

Given the code fragment:

What is the result?

Options:

A.

A compilation error occurs.

B.

A runtime exception is thrown.

C.

Julia

Peter

D.

Peter

Julia

Question 6

Identify three features of the Java programming language.

Options:

A.

distributed

B.

direct memory management

C.

multithreaded

D.

strongly typed

E.

dynamically typed

Question 7

Given the code fragment:

What is the result?

Options:

A.

25.67

B.

25.00

C.

25.7

D.

26

Question 8

Given:

Which statement is true about the main method?

Options:

A.

It can be a non-static method.

B.

Its parameter can be of type Integer [].

C.

It cannot be defined in a non-public class.

D.

It cannot be invoked by its name.

Question 9

Which package would you import to use the Random class?

Options:

A.

java.io

B.

java.math

C.

java.util

D.

java.lang

Question 10

Given the code fragment:

What is the result?

Options:

A.

9

12

B.

10

10

C.

9

9

D.

10

14

Question 11

Given the classes:

Which two modifications, independently, enable the Salad.java file to compile?

Options:

A.

Replace line n1 with import fruits.Apple.getApple();

B.

Replace line n1 with import fruits.Apple;

C.

Replace line n1 with import fruits;

D.

Replace line n2 with fruits.Apple apple = new Apple ();

E.

Replace line n2 with fruits.Apple apple = new fruits.Apple ();

Exam Detail
Vendor: Oracle
Certification: Java SE
Exam Code: 1z0-811
Exam Name: Java Foundations
Last Update: Dec 22, 2024
1z0-811 Question Answers
Page: 1 / 3
Total 75 questions