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

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

Questions 4

Given the code fragment:

1z0-808 Question 4

What is the result?

Options:

A.

100

B.

101

C.

102

D.

103

E.

Compilation fails

Buy Now
Questions 5

Given the code fragments:

1z0-808 Question 5

Which modification enables the code to compile?

1z0-808 Question 5

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 6

Given the code fragment:

1z0-808 Question 6

Which three lines fail to compile? (Choose three.)

Options:

A.

Line 7

B.

Line 8

C.

Line 9

D.

Line 10

E.

Line 11

F.

Line 12

Buy Now
Questions 7

Given the following code:

1z0-808 Question 7

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 8

Given:

1z0-808 Question 8

What is the result?

Options:

A.

10:20

B.

0:20

C.

Compilation fails at line n1

D.

Compilation fails at line n2

Buy Now
Questions 9

Given the code fragment:

1z0-808 Question 9

Which modification enables the code to print 54321?

Options:

A.

Replace line 6 with System.out.print (--x);

B.

At line 7, insert x --;

C.

Replace line 5 with while (is Available(--x)) {

D.

Replace line 12 with return (x > 0) ? false : true;

Buy Now
Questions 10

Which three are advantages of the Java exception mechanism? (Choose three.)

Options:

A.

Improves the program structure because the error handling code is separated from the normal program function

B.

Provides a set of standard exceptions that covers all possible errors

C.

Improves the program structure because the programmer can choose where to handle exceptions

D.

Improves the program structure because exceptions must be handled in the method in which they occurred

E.

Allows the creation of new exceptions that are customized to the particular program being created

Buy Now
Questions 11

Given the code fragment:

1z0-808 Question 11

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

1z0-808 Question 11

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 12

Given the code fragment:

1z0-808 Question 12

What is the result?

Options:

A.

It results in a compile time error at line 18.

B.

It results in a compile time error at line 9.

C.

It prints : 1

D.

It results in a compile time error at lines at lines 12 and 15.

Buy Now
Questions 13

Given:

Acc.java:

1z0-808 Question 13

Which statement is true?

Options:

A.

Both p and s are accessible via obj.

B.

Only s is accessible via obj.

C.

Both r and s are accessible via obj.

D.

p, r, and s are accessible via obj.

Buy Now
Questions 14

Given the code fragment:

1z0-808 Question 14

What is the result?

Options:

A.

100

B.

101

C.

102

D.

103

E.

Compilation fails

Buy Now
Questions 15

Given this array:

1z0-808 Question 15

Which two code fragments, independently, print each element in this array? (Choose two.)

1z0-808 Question 15

1z0-808 Question 15

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

F.

Option F

Buy Now
Questions 16

Given:

1z0-808 Question 16

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 17

Given the code fragment:

1z0-808 Question 17

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 18

Given the code fragment:

1z0-808 Question 18

What is the result?

Options:

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.

Buy Now
Questions 19

Given the code fragment:

1z0-808 Question 19

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

1z0-808 Question 19

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 20

Given the code fragment:

1z0-808 Question 20

Which two modifications enable the code to compile?

Options:

A.

Make the method at line 8 protected.

B.

Make the method at line 8 public.

C.

Make the method at line 10 protected.

D.

Make the method at line 4 public.

E.

Make the method at line 2 public.

Buy Now
Questions 21

Given the code fragment:

1z0-808 Question 21

Which modification enables the code fragment to print TrueDone?

Options:

A.

Replace line 5 With String opt = "true";Replace line 7 with case "true":

B.

Replace line 5 with boolean opt = l;Replace line 7 with case 1:

C.

At line 9, remove the break statement.

D.

Remove the default section.

Buy Now
Questions 22

Given the code fragment:

1z0-808 Question 22

Test.java:

1z0-808 Question 22

Which is the result?

1z0-808 Question 22

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Buy Now
Questions 23

Given:

1z0-808 Question 23

What is the result?

Options:

A.

10

20

B.

A compile time error occurs

C.

20

20

D.

10

10

Buy Now
Questions 24

Given the code fragment:

1z0-808 Question 24

What is the result?

Options:

A.

5 : 5

B.

10 : 10

C.

5 : 10

D.

Compilation fails.

Buy Now
Questions 25

Which two array initialization statements are valid? (Choose two.)

Options:

A.

int array[] = new int[3] {1, 2, 3};

B.

int array[] = new int[3]; array[0] = 1;

array[1] = 2;

array[2] = 3;

C.

int array[3] = new int[] {1, 2, 3};

D.

int array[] = new int[3]; array = {1, 2, 3};

E.

int array[] = new int[] {1,2,3};

Buy Now
Questions 26

Given:

1z0-808 Question 26

What is the result?

1z0-808 Question 26

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 27

Given:

1z0-808 Question 27

What is the result?

Options:

A.

Compilation fails.

B.

11

C.

8

D.

9

E.

10

Buy Now
Questions 28

Given the code fragment:

1z0-808 Question 28

What is the result?

Options:

A.

3

B.

4

C.

-1

D.

Compilation fails.

Buy Now
Questions 29

Given:

1z0-808 Question 29

What is the result?

Options:

A.

int main 1

B.

Object main 1

C.

String main 1

D.

Compilation fails

E.

An exception is thrown at runtime

Buy Now
Questions 30

Given the code fragment:

1z0-808 Question 30

What is the result?

Options:

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 25Walter 52

Buy Now
Questions 31

Given the code fragment:

1z0-808 Question 31

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

1z0-808 Question 31

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 32

Given:

1z0-808 Question 32

What is the result?

Options:

A.

3 4 5 6

B.

3 4 3 6

C.

5 4 5 6

D.

3 6 4 6

Buy Now
Questions 33

This grid shows the state of a 2D array:

1z0-808 Question 33

The grid is created with this code:

1z0-808 Question 33

Which line of code, when inserted in place of //line n1, adds an X into the grid so that the grid contains three consecutive Xs?

Options:

A.

grid[2][1] = ‘X’;

B.

grid[3][2] = ‘X’;

C.

grid[3][1] = ‘X’;

D.

grid[2][3] = ‘X’;

Buy Now
Questions 34

Given:

1z0-808 Question 34

and the code fragment:

1z0-808 Question 34

What is the result?

Options:

A.

AC

B.

BD

C.

BC

D.

AD

Buy Now
Questions 35

Given the definitions of the Bird class and the Peacock class:

1z0-808 Question 35

and the code fragment:

1z0-808 Question 35

Which code snippet can be inserted to print Fly.Dance. ?

Options:

A.

Bird p = new Peacock();

B.

Bird b = new Bird();Peacock p = (Peacock) b;

C.

Peacock b = new Peacock ();Bird p = (Bird) b;

D.

Bird b = new Peacock ();Peacock p = (Peacock) b;

Buy Now
Questions 36

Given the code fragment:

1z0-808 Question 36

What is the result?

Options:

A.

2012-02-10

B.

2012-01-30

C.

2012-02-10 00:00

D.

A DateTimeException is thrown at runtime.

Buy Now
Questions 37

Given the code fragment:

1z0-808 Question 37

What is the result?

Options:

A.

1 2 3 0 01 2 3 0 0

B.

An Exception is thrown at run time.

C.

1 2 3 0 01 2 3

D.

1 2 31 2 3

Buy Now
Questions 38

Given:

1z0-808 Question 38

What is the result?

Options:

A.

Compilation fails at line n1.

B.

InitializedStartedInitialized

C.

InitializedStarted

D.

Compilation fails at line n2.

Buy Now
Questions 39

Given:

1z0-808 Question 39

What is the result?

Options:

A.

Good Luck!

B.

Good Day!

C.

Welcome!

D.

Hello!

Buy Now
Questions 40

Given:

1z0-808 Question 40

What is the result?

Options:

A.

Vehicle Bus

B.

Bus

Vehicle

C.

Bus

D.

The program doesn’t print anything

Buy Now
Questions 41

Given the code fragment:

1z0-808 Question 41

What is the result?

Options:

A.

1 2 3 0 01 2 3 0 0

B.

An Exception is thrown at run time.

C.

1 2 3 0 01 2 3

D.

1 2 31 2 3

Buy Now
Questions 42

Given:

1z0-808 Question 42

And given the commands:

1z0-808 Question 42

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 43

Given the code fragment:

1z0-808 Question 43

Assume that the system date is June 20, 2014. What is the result?

1z0-808 Question 43

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 44

Given:

1z0-808 Question 44

What is the result?

1z0-808 Question 44

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 45

Given the definitions of the Bird class and the Peacock class:

1z0-808 Question 45

and the code fragment:

1z0-808 Question 45

Which code snippet can be inserted to print Fly.Dance. ?

Options:

A.

Bird p = new Peacock();

B.

Bird b = new Bird();Peacock p = (Peacock) b;

C.

Peacock b = new Peacock ();Bird p = (Bird) b;

D.

Bird b = new Peacock ();Peacock p = (Peacock) b;

Buy Now
Questions 46

Given:

1z0-808 Question 46

What is the result?

Options:

A.

c=null

b=true

f=0.0

B.

c=

b=false

f=0.0

C.

c=null

b=false

f=0.0

D.

c=0

b=false

f=0.0F

Buy Now
Questions 47

Given the following code:

1z0-808 Question 47

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 48

Given the code fragment:

1z0-808 Question 48

What is the result?

Options:

A.

A B C Work done

B.

A B C D Work done

C.

A Work done

D.

Compilation fails

Buy Now
Questions 49

Given the code from the Greeting.Java file:

1z0-808 Question 49

Which set of commands prints Hello Duke in the console?

1z0-808 Question 49

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 50

Given:

1z0-808 Question 50

Given the code fragment:

1z0-808 Question 50

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

Options:

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();

Buy Now
Questions 51

Given:

1z0-808 Question 51

What is the result?

Options:

A.

10 : 30 : 6

B.

10 : 22 : 22

C.

10 : 22 : 20

D.

10 : 22 : 6

Buy Now
Questions 52

Given:

1z0-808 Question 52

What is the result?

Options:

A.

true

B.

false

C.

-1

D.

0

Buy Now
Questions 53

Given the code fragment:

1z0-808 Question 53

What is the result?

Options:

A.

1 2 3 4followed by an ArrayIndexOutOfBoundsException

B.

1 2 3

C.

1 2 3 4

D.

Compilation fails.

Buy Now
Questions 54

Given:

1z0-808 Question 54

And the code fragment:

1z0-808 Question 54

What is the result?

Options:

A.

C1C2

B.

C1C1

C.

Compilation fails.

D.

C2C2

Buy Now
Questions 55

Given:

1z0-808 Question 55

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 56

Given:

1z0-808 Question 56

And given the code fragment:

1z0-808 Question 56

What is the result?

Options:

A.

4W 100 Auto4W 150 Manual

B.

null 0 Auto4W 150 Manual

C.

Compilation fails only at line n1

D.

Compilation fails only at line n2

E.

Compilation fails at both line n1 and line n2

Buy Now
Questions 57

Given the code fragment:

1z0-808 Question 57

What is the result?

1z0-808 Question 57

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Buy Now
Questions 58

Given the code fragment:

1z0-808 Question 58

What is the result?

Options:

A.

3

B.

0

C.

Compilation fails.

D.

-1

Buy Now
Questions 59

Which statement is true about the switch statement?

Options:

A.

It must contain the default section.

B.

The break statement, at the end of each case block, is mandatory.

C.

Its case label literals can be changed at runtime.

D.

Its expression must evaluate to a single value.

Buy Now
Questions 60

Given the code fragment:

1z0-808 Question 60

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 61

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

Options:

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 ;

Buy Now
Questions 62

Given:

1z0-808 Question 62

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.*;

Buy Now
Questions 63

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.

Buy Now
Questions 64

Which statement is true about the main() method?

Options:

A.

It is invoked by JRE

B.

It is a final method

C.

It returns true if it is executed successfully at run time

D.

It must be defined within a public class

Buy Now
Questions 65

Given the code fragment:

1z0-808 Question 65

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

1z0-808 Question 65

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 66

Which three statements describe the object-oriented features of the Java language? (Choose three.)

Options:

A.

Objects cannot be reused.

B.

A subclass must override the methods from a superclass.

C.

Objects can share behaviors with other objects.

D.

A package must contain a main class.

E.

Object is the root class of all other objects.

F.

A main method must be declared in every class.

Buy Now
Questions 67

Given the code fragment:

1z0-808 Question 67

What is the result?

Options:

A.

S 6

B.

S 5

C.

s-1

D.

w 7

Buy Now
Exam Code: 1z0-808
Exam Name: Java SE 8 Programmer I
Last Update: Apr 30, 2024
Questions: 224

PDF + Testing Engine

$56  $159.99

Testing Engine

$42  $119.99
buy now 1z0-808 testing engine

PDF (Q&A)

$35  $99.99
buy now 1z0-808 pdf
dumpsmate guaranteed to pass
24/7 Customer Support

DumpsMate's team of experts is always available to respond your queries on exam preparation. Get professional answers on any topic of the certification syllabus. Our experts will thoroughly satisfy you.

Site Secure

mcafee secure

TESTED 04 May 2024