Labour Day Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

Newly Released Oracle 1z0-808 Exam PDF

Page: 15 / 17
Total 224 questions

Java SE 8 Programmer I Questions and Answers

Question 57

Given:

Which action fixes the compiler error?

Options:

A.

At line 17, add throws AccessViolationException

B.

At line 13, add throws LogFileException

C.

At line 2, replace throws LogFileException with throws AccessViolationException

D.

At line 7, insert throw new LogFileException ();

Question 58

Which three statements are true about the structure of a Java class? (Choose three.)

Options:

A.

A class cannot have the same name as its field.

B.

A public class must have a main method.

C.

A class can have final static methods.

D.

A class can have overloaded private constructors.

E.

Fields need to be initialized before use.

F.

Methods and fields are optional components of a class.

Question 59

Given the code fragment:

What is the result?

Options:

A.

The sum of 4 numbers is: 10

B.

A compile time error occurs.

C.

The sum of 5 numbers is: 10

D.

The sum of 5 numbers is: 15

Question 60

Given the code fragment:

What is the result?

Options:

A.

1:2:3:4:5:

B.

1:2:3:

C.

Compilation fails.

D.

An ArrayOutOfBoundsException is thrown at runtime.

Page: 15 / 17
Total 224 questions