Summer Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ecus65

Oracle 1z0-811 - Java Foundations

Page: 1 / 3
Total 75 questions

Given:

What is the result?

A.

[null:-]

B.

[ : ]

C.

[null:null]

D.

[:null]

Given the code fragment:

What is the output?

A.

8

B.

3

C.

0

D.

A compilation error occurs.

Identify two Java reserved words.

A.

array

B.

true

C.

this

D.

exception

E.

string

Given:

What is the result?

A.

20

B.

32

C.

A compilation error occurs.

D.

21

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.

Given the code

What is the result?

A.

The program executes indefinitely.

B.

num = 100

C.

num = 99

D.

num = 0

Given:

What is the output?

A.

1 2 3 aaaa

B.

1 2 aaa

C.

Compilation fails

D.

a

Given the classes:

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

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 ();

Which statement is true about a Java method?

A.

It must be declared with an access modifier.

B.

It cannot be defined within another method.

C.

It must accept a parameter and return a value.

D.

It cannot be defined as static final.

Given the code fragment:

What is the result?

A.

25.67

B.

25.00

C.

25.7

D.

26