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

Oracle 1z0-808 - Java SE 8 Programmer I

Page: 7 / 7
Total 224 questions

Given the code fragment:

What is the result?

A.

Answer = 0

B.

Invalid calculation

C.

Compilation fails only at line n1.

D.

Compilation fails only at line n2.

E.

Compilation fails at line n1 and line2.

Given the code fragment:

Which two modifications, made independently, enable the code to compile? (Choose two.)

A.

Make the method at line n1 public.

B.

Make the method at line n2 public.

C.

Make the method at line n3 public.

D.

Make the method at line n3 protected.

E.

Make the method at line n4 public.

Given:

What is the result?

A.

int main 1

B.

Object main 1

C.

String main 1

D.

Compilation fails

E.

An exception is thrown at runtime

Given:

What is the result?

A.

true:true

B.

true:false

C.

false:true

D.

false:false

Given:

And given the commands:

What is the result?

A.

Success

B.

Failure

C.

Compilation fails.

D.

An exception is thrown at runtime

Given the following class declarations:

    public abstract class Animal

    public interface Hunter

    public class Cat extends Animal implements Hunter

    public class Tiger extends Cat

Which answer fails to compile?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Which two initialization statements are valid? (Choose two.)

A.

Boolean available = “TRUE”:

B.

String tmpAuthor = author, author =”Mc Donald”;

C.

Double price = 200D;

D.

Integer pages = 20;