March Sale Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: netbudy65

1z0-808 Java SE 8 Programmer I Questions and Answers

Questions 4

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.

Buy Now
Questions 5

Given:

And given the commands:

What is the result?

Options:

A.

1 null

B.

true false

C.

false false

D.

true true

E.

A ClassCastException is thrown at runtime.

Buy Now
Questions 6

Given:

What is the result?

Options:

A.

Compilation fails.

B.

false true

C.

true false

D.

true true

E.

false false

Buy Now
Questions 7

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.

Buy Now
Questions 8

Given the code fragment:

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

Options:

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.

Buy Now
Questions 9

Given the code fragment:

What is the result?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Buy Now
Questions 10

Given the following code:

What are the values of each element in intArr after this code has executed?

Options:

A.

15, 60, 45, 90, 75

B.

15, 90, 45, 90, 75

C.

15, 30, 75, 60, 90

D.

15, 30, 90, 60, 90

E.

15, 4, 45, 60, 90

Buy Now
Questions 11

Given:

What is the result?

Options:

A.

Hello Log 2:2

B.

Welcome Log 1:2

C.

Welcome Log 2:1

D.

Hello Log 1:2

Buy Now
Questions 12

Given the code fragment:

What is the result?

Options:

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.

Buy Now
Questions 13

You are asked to develop a program for a shopping application, and you are given this information:

  • The application must contain the classes Toy, EduToy, and ConsToy. The Toy class is the superclass of the other two classes.
  • The int calculatePrice (Toy t) method calculates the price of a toy.
  • The void printToy (Toy t) method prints the details of a toy.

Which definition of the Toy class adds a valid layer of abstraction to the class hierarchy?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 14

Which two code fragments cause compilation errors? (Choose two.)

Options:

A.

double y1 = 203.22; float fit = y1;

B.

float fit = (float) 1_11.00;

C.

Float fit = 100.00;

D.

int y2 = 100;

float fit = (float) y2;

E.

float fit = 100.00F;

Buy Now
Questions 15

Given the code fragment:

Which code snippet at line 9 prints true?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 16

Given the code fragment:

What is the result?

Options:

A.

2012-02-10

B.

2012-02-11

C.

Compilation fails

D.

A DateTimeException is thrown at runtime.

Buy Now
Questions 17

Which statement will empty the contents of a StringBuilder variable named sb?

Options:

A.

sb. deleteAll ();

B.

sb. delete (0, sb. size () );

C.

sb. delete (0, sb. length () );

D.

sb. removeAll ();

Buy Now
Questions 18

Given the code fragment:

What is the result?

Options:

A.

A B C

B.

A B C D E

C.

A B D E

D.

Compilation fails.

Buy Now
Questions 19

Given the code fragment:

What is the result?

Options:

A.

1 3 5 71 3

B.

1 31 3

C.

1 31 3 0 0

D.

1 3followed by an ArrayIndexOutOfBoundsException

E.

Compilation fails.

Buy Now
Questions 20

Examine:

Which statement is true?

Options:

A.

The program prints m1.Accessed.

B.

The program fails compile due to the unhandled E1 exception.

C.

The program prints m2.Accessed.

D.

The program fails to compile due to the unhandled E2 exception.

Buy Now
Questions 21

Given:

What is the result?

Options:

A.

97 9899 100 null null null

B.

97 9899 100 101 102 103

C.

Compilation fails.

D.

A NullPointerException is thrown at runtime.

E.

An ArraylndexOutOfBoundsException is thrown at runtime.

Buy Now
Questions 22

Given the code fragment:

What is the result?

Options:

A.

Match 1

B.

Match 2

C.

No Match

D.

A NullPointerException is thrown at runtime.

Buy Now
Questions 23

Given the code fragment:

Which option can replace xxx to enable the code to print 135?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 24

Given:

And given the code fragment:

What is the result?

Options:

A.

Compilation fails at line n2.

B.

Read Book

C.

Read E-Book

D.

Compilation fails at line n1.

E.

Compilation fails at line n3.

Buy Now
Questions 25

Given the code fragment:

What is the result?

Options:

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.

Buy Now
Questions 26

Given the code fragment:

What is the result?

Options:

A.

An exception is thrown at runtime.

B.

-1

C.

5

D.

10

Buy Now
Questions 27

Given the code fragment:

What is the result?

Options:

A.

1324

B.

2313

C.

3142

D.

4231

Buy Now
Questions 28

Given:

What is the result?

Options:

A.

AB

B.

AC

C.

CC

D.

A ClassCastException is thrown only at line n1.

E.

A ClassCastException is thrown only at line n2.

Buy Now
Questions 29

Given the code fragment:

What is the result?

Options:

A.

An exception is thrown at runtime.

B.

Compilation fails.

C.

13480.0

D.

13480.02

Buy Now
Questions 30

Given:

What is the result?

Options:

A.

200.0 : 100.0

B.

400.0 : 200.0

C.

400.0 : 100.0

D.

Compilation fails.

Buy Now
Questions 31

Given the code fragment:

and the requirements of the application:

  • It must display the menu.
  • It must print the option selected.
  • It must continue its execution till it reads ‘0’.

Which code fragment can be used to meet the requirements?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

OptionD

Buy Now
Questions 32

Given the code fragment:

What is the result?

Options:

A.

[JavaForum, ExpertForum]

B.

[JavaGroup, ExpertGroup]

C.

[JavaForumGroup, ExpertForumGroup]

D.

[JavaGroup, TechGroup ExpertGroup]

Buy Now
Questions 33

Given:

What is the result?

Options:

A.

false, false

B.

false, true

C.

true, false

D.

true, true

Buy Now
Exam Code: 1z0-808
Exam Name: Java SE 8 Programmer I
Last Update: Mar 29, 2024
Questions: 223

PDF + Testing Engine

$140

Testing Engine

$105

PDF (Q&A)

$90