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

Free Oracle 1z0-808 Practice Exam with Questions & Answers | Set: 5

Questions 41

Given the code fragment:

1z0-808 Question 41

What is the result?

Options:
A.

An exception is thrown at runtime.

B.

-1

C.

5

D.

10

Oracle 1z0-808 Premium Access
Questions 42

Which two statements are true? (Choose two.)

Options:
A.

Error class is unextendable.

B.

Error class is extendable.

C.

Error is a RuntimeException.

D.

Error is an Exception.

E.

Error is a Throwable.

Questions 43

Given:

1z0-808 Question 43

What is the result?

Options:
A.

An exception is thrown at runtime.

B.

InitializedStartedInitialized

C.

InitializedStarted

D.

Compilation fails.

Questions 44

Which statement is true about Java byte code?

Options:
A.

It can run on any platform.

B.

It can run on any platform only if it was compiled for that platform.

C.

It can run on any platform that has the Java Runtime Environment.

D.

It can run on any platform that has a Java compiler.

E.

It can run on any platform only if that platform has both the Java Runtime Environment and a Java compiler.

Questions 45

Given this segment of code:

1z0-808 Question 45

Which two statements, if either were true, would make the code compile? (Choose two.)

Options:
A.

MotorCycle is an interface that implements the Cycle class.

B.

Cycle is an interface that is implemented by the MotorCycle class.

C.

Cycle is an abstract superclass of MotorCycle.

D.

Cycle and MotorCycle both extend the Transportation superclass.

E.

Cycle and MotorCycle both implement the Transportation interface.

F.

MotorCycle is a superclass of Cycle.

Questions 46

Given the code from the Greeting.Java file:

1z0-808 Question 46

Which set of commands prints Hello Duke in the console?

1z0-808 Question 46

Options:
A.

Option A

B.

Option B

C.

Option C

D.

Option D

Questions 47

Given:

1z0-808 Question 47

Which two code fragments can be inserted at line n1?

Options:
A.

String str = “Java”;

B.

for(int iVal = 0; iVal <=5; iVal++){}

C.

Test() {}

D.

package p1;

E.

import java.io.*;

Questions 48

Given these classes:

1z0-808 Question 48

And given this main method:

1z0-808 Question 48

Which two options compile when placed at line n1 of the main method? (Choose two.)

Options:
A.

director.stockOptions = 1_000;

B.

employee.salary = 50_000;

C.

manager.budget = 1_000_000;

D.

manager.stockOption = 500;

E.

employee.budget = 200_000;

F.

director.salary = 80_000;

Questions 49

Given:

1z0-808 Question 49

And given the commands:

1z0-808 Question 49

What is the result?

Options:
A.

Success

B.

Failure

C.

Compilation fails.

D.

An exception is thrown at runtime

Questions 50

You are asked to create a method that accepts an array of integers and returns the highest value from that array.

Given the code fragment:

1z0-808 Question 50

Which method signature do you use at line n1?

Options:
A.

public int findMax (int[] numbers)

B.

static int[] findMax (int[] max)

C.

static int findMax (int[] numbers)

D.

final int findMax (int[] )