Certbus > Oracle > Oracle Database > 1Z0-808 > 1Z0-808 Online Practice Questions and Answers

1Z0-808 Online Practice Questions and Answers

Questions 4

Given: What is the result?

A. true:true

B. true:false

C. false:true

D. false:false

Browse 385 Q&As
Questions 5

Given: What is the result?

A. 1

B. 1

C. 2

D. Compilation fails

E. The loop executes infinite times

Browse 385 Q&As
Questions 6

Given the code fragment: What is the result?

A. Execution terminates in the first catch statement, and caught a RuntimeException is printed to the console.

B. Execution terminates In the second catch statement, and caught an Exception is printed to the console.

C. A runtime error is thrown in the thread "main".

D. Execution completes normally, and Ready to us?is printed to the console.

E. The code fails to compile because a throws keyword is required.

Browse 385 Q&As
Questions 7

Given:

What is the result?

A. Null

B. Compilation fails

C. An exception is thrown at runtime

D. 0

Browse 385 Q&As
Questions 8

Given:

A. a, e i, i

B. a, e o, o

C. e, e i, i

D. a, a o, o

Browse 385 Q&As
Questions 9

Given:

class MarksOutOfBoundsException extends IndexOutOfBoundsException { }

public class GradingProcess {

void verify(int marks) throws IndexOutOfBoundsException {

if (marks > 100) {

throw new MarksOutOfBoundsException();

}

if (marks > 50) {

System.out.print("Pass");

} else {

System.out.print("Fail");

}

}

public static void main(String[] args) {

int marks = Integer.parseInt(args[2]);

try {

new GradingProcess().verify(marks));

} catch(Exception e) {

System.out.print(e.getClass());

}

}

}

And the command line invocation:

Java grading process 89 50 104

What is the result?

A. Pass

B. Fail

C. Class MarketOutOfBoundsException

D. Class IndexOutOfBoundsException

E. Class Exception

Browse 385 Q&As
Questions 10

Given: Which statement is true?

A. Both p and s are accessible by obj.

B. Only s is accessible by obj.

C. Both r and s are accessible by obj.

D. p, r, and s are accessible by obj.

Browse 385 Q&As
Questions 11

Which two items can legally be contained within a java class declaration?

A. An import statement

B. A field declaration

C. A package declaration

D. A method declaration

Browse 385 Q&As
Questions 12

Given the code fragment:

What is the result?

A. A B C

B. A B C D E

C. A B D E

D. Compilation fails.

Browse 385 Q&As
Questions 13

Given the code fragment: What is the result?

A. A NullPointerException is thrown at runtime.

B. [1, 2, 4]

C. [1, 2, 4, null ]

D. [1, 3, 4, null ]

E. [1, 3, 4 ]

F. Compilation fails.

Browse 385 Q&As
Questions 14

Given the code fragment:

What is the result?

A. 2012-02-10 00:00

B. 2012-01-30

C. 2012-02-10

D. A DateTimeException is thrown at runtime.

Browse 385 Q&As
Questions 15

Given the code fragment:

What is the result?

A. Compilation fails.

B. The program compiles, but it prints nothing.

C. HiHowAreYou removed

D. An UnsupportedOperationException is thrown at runtime.

Browse 385 Q&As
Questions 16

Given the code fragment:

Which code fragment, when inserted at line n1, enables the App class to print Equal?

A. Option A

B. Option B

C. Option C

D. Option D

Browse 385 Q&As
Questions 17

Given the code fragment:

What is the result?

A. Sum is 600

B. Compilation fails at line n1.

C. Compilation fails at line n2.

D. A ClassCastException is thrown at line n1.

E. A ClassCastException is thrown at line n2.

Browse 385 Q&As
Questions 18

Given: Which statement is true?

A. The program executes and prints:

500.0

B. Commenting line 16 enables the program to print: Thank You!

500.0

C. Commenting line 13 enables the program to print: Thank You!

500.0

D. The program executes and prints: Thank You!

500.0

Browse 385 Q&As
Exam Code: 1Z0-808
Exam Name: Java SE 8 Programmer I
Last Update: Apr 19, 2024
Questions: 385 Q&As

PDF

$45.99

VCE

$49.99

PDF + VCE

$59.99