1z0-808Free trialFree trial

By oracle
Aug, 2025

Verified

25Q per page

Question 1

Given:

Image 1

What is the result?

  • A: 200.0 : 100.0
  • B: 400.0 : 200.0
  • C: 400.0 : 100.0
  • D: Compilation fails.

Question 2

Given the code fragment:

Image 1

What is the result?

  • A: Match 1
  • B: Match 2
  • C: No Match
  • D: A NullPointerException is thrown at runtime.

Question 3

Given:

Image 1

What is the result?

  • A: Compilation fails at line n3 and line n4.
  • B: Compilation fails at line n1 and line n2.
  • C: Welcome Visit Count:1 Welcome Visit Count: 1
  • D: Welcome Visit Count:1 Welcome Visit Count: 2

Question 4

Given the code fragment:

Image 1

What is the result?

  • A: Compilation fails at both line n1 and line n2.
  • B: Compilation fails only at line n2.
  • C: Compilation fails only at line n1.
  • D: Jesse 25 Walter 52

Question 5

Given the code fragment:

Image 1

What is the result?

  • A: 5 : 5
  • B: 10 : 10
  • C: 5 : 10
  • D: Compilation fails.

Question 6

Given the code fragment:

Image 1

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.

Question 7

Given:

Image 1

What is the result?

  • A: 10 20 30 40
  • B: 0 0 30 40
  • C: Compilation fails.
  • D: An exception is thrown at runtime.

Question 8

Which two code fragments cause a compilation error? (Choose two.)

  • A: float flt = 100.00F;
  • B: float flt = (float) 1_11.00;
  • C: Float flt = 100.00;
  • D: double y1 = 203.22; float flt = y1;
  • E: int y2 = 100; float flt = (float) y2 ;

Question 9

Given:

Image 1

What is the result?
A.

Image 2

B.

Image 3

C.

Image 4

D.

Image 5

Question 10

Which three statements are true about exception handling? (Choose three.)

  • A: Only unchecked exceptions can be rethrown.
  • B: All subclasses of the RuntimeException class are not recoverable.
  • C: The parameter in a catch block is of Throwable type.
  • D: All subclasses of the RuntimeException class must be caught or declared to be thrown.
  • E: All subclasses of the RuntimeException class are unchecked exceptions.
  • F: All subclasses of the Error class are not recoverable.

Question 11

Given the code fragment:

Image 1

What is the result?

  • A: An exception is thrown at runtime.
  • B: -1
  • C: 5
  • D: 10

Question 12

Given:

Image 1

And given the code fragment:
Book book1 = new EBook();
book1.readBook();
Which option enables the code to compile?

Image 2
  • A: Option A
  • B: Option B
  • C: Option C
  • D: Option D

Question 13

Given:

Image 1

What is the result?

  • A: false, false
  • B: false, true
  • C: true, false
  • D: true, true

Question 14

Which two statements are true? (Choose two.)

  • 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.

Question 15

Given the code fragment:

Image 1

What is the result?

  • A: Compilation fails.
  • B: 0 Found
  • C: 1 Found
  • D: 3 Found

Question 16

Given the code fragment:

Image 1

What is the result?

  • A: An exception is thrown at runtime.
  • B: 07-31-2014
  • C: 2014-07-31
  • D: 2014-09-30

Question 17

Given:

Image 1

And given the commands:

Image 2

What is the result?

  • A: Java SE
  • B: Java EE
  • C: Compilation fails at line n1.
  • D: A NullPointerException is thrown at runtime.

Question 18

Given this class:

Image 1

And given this main method, located in another class:

Image 2

Which three pieces of code, when inserted independently, set the value of amount to 100? (Choose three.)
A.

Image 3

B.

Image 4

C.

Image 5

D.

Image 6

E.

Image 7

F.

Image 8

Question 19

Given the code fragments:

Image 1

What is the result?

  • A: Compilation fails only at line n2.
  • B: RTool::export Tool::export
  • C: Tool::export Tool:export
  • D: Compilation fails only at line n1.
  • E: Compilation fails at both line n1 and line n2.

Question 20

Given the code fragment:

Image 1

What is the result?

  • A: An exception is thrown at runtime.
  • B: Compilation fails.
  • C: 13480.0
  • D: 13480.02

Question 21

Given:

Image 1

And given the code fragment:

Image 2

What is the result?

  • A: 300:300 200:300
  • B: 300:100 200:300
  • C: 300:0 0:300
  • D: 100:300 300:200

Question 22

Given:

Image 1

And given the code fragment:

Image 2

What is the result?

  • A: C2C2
  • B: C1C2
  • C: C1C1
  • D: Compilation fails

Question 23

Given:

Image 1

What is the result?

  • A: A B C D
  • B: A C D
  • C: A C D D
  • D: A B D
  • E: A B D C

Question 24

Given:

Image 1

Given the code fragment:

Image 2

Which two sets of actions, independently, enable the code fragment to print Fit?

  • A: At line n1 insert: import clothing.Shirt; At line n2 insert: String color = Shirt.getColor();
  • B: At line n1 insert: import clothing; At line n2 insert: String color = Shirt.getColor();
  • C: At line n1 insert: import static clothing.Shirt.getColor; At line n2 insert: String color = getColor();
  • D: At line n1 no changes required. At line n2 insert: String color = Shirt.getColor();
  • E: At line n1 insert: import Shirt; At line n2 insert: String color = Shirt.getColor();

Question 25

Given the code fragments:

Image 1

And:

Image 2

Which statement is true?

  • A: After line 11, three objects are eligible for garbage collection.
  • B: After line 11, two objects are eligible for garbage collection.
  • C: After line 11, one object is eligible for garbage collection.
  • D: After line 11, none of the objects are eligible for garbage collection.
Page 1 of 10 • Questions 1-25 of 234

Free preview mode

Enjoy the free questions and consider upgrading to gain full access!