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

1z0-808 PDF

$38.5

$109.99

3 Months Free Update

  • Printable Format
  • Value of Money
  • 100% Pass Assurance
  • Verified Answers
  • Researched by Industry Experts
  • Based on Real Exams Scenarios
  • 100% Real Questions

1z0-808 PDF + Testing Engine

$61.6

$175.99

3 Months Free Update

  • Exam Name: Java SE 8 Programmer I
  • Last Update: May 1, 2024
  • Questions and Answers: 224
  • Free Real Questions Demo
  • Recommended by Industry Experts
  • Best Economical Package
  • Immediate Access

1z0-808 Engine

$46.2

$131.99

3 Months Free Update

  • Best Testing Engine
  • One Click installation
  • Recommended by Teachers
  • Easy to use
  • 3 Modes of Learning
  • State of Art Technology
  • 100% Real Questions included

1z0-808 Practice Exam Questions with Answers Java SE 8 Programmer I Certification

Question # 6

Given:

1z0-808 question answer

What is the result?

A.

int main 1

B.

Object main 1

C.

String main 1

D.

Compilation fails

E.

An exception is thrown at runtime

Full Access
Question # 7

Given the code fragment:

1z0-808 question answer

What is the result?

A.

2 4

B.

0 2 4 6

C.

0 2 4

D.

Compilation fails.

Full Access
Question # 8

Given the code fragment:

1z0-808 question answer

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

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 9

Given:

1z0-808 question answer

And given the code fragment:

1z0-808 question answer

What is the result?

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

Full Access
Question # 10

Given the code fragment:

1z0-808 question answer

Test.java:

1z0-808 question answer

Which is the result?

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Full Access
Question # 11

Given the following code:

1z0-808 question answer

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

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

Full Access
Question # 12

Given:

1z0-808 question answer

What is the result?

A.

BaseDerivedA

B.

BaseDerivedB

C.

DerivedBDerivedB

D.

DerivedBDerivedA

E.

A ClassCastException is thrown at runtime.

Full Access
Question # 13

Given the code fragment:

1z0-808 question answer

And given the requirements:

1. Process all the elements of the array in the order of entry.

2. Process all the elements of the array in the reverse order of entry.

3. Process alternating elements of the array in the order of entry.

Which two statements are true? (Choose two.)

A.

Requirements 1, 2, and 3 can be implemented by using the enhanced for loop.

B.

Requirements 1, 2, and 3 can be implemented by using the standard for loop.

C.

Requirements 2 and 3 CANNOT be implemented by using the standard for loop.

D.

Requirement 1 can be implemented by using the enhanced for loop.

E.

Requirement 3 CANNOT be implemented by using either the enhanced for loop or the standard for loop.

Full Access
Question # 14

Given:

1z0-808 question answer

What is the result?

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

Full Access
Question # 15

Given the code fragment:

1z0-808 question answer

Which modification enables the code fragment to print TrueDone?

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.

Full Access
Question # 16

Given the code fragment:

1z0-808 question answer

What is the result?

A.

A B C

B.

A B C D E

C.

A B D E

D.

Compilation fails.

Full Access
Question # 17

Given the code fragment:

1z0-808 question answer

What is the result?

A.

A B C Work done

B.

A B C D Work done

C.

A Work done

D.

Compilation fails

Full Access
Question # 18

Given:

1z0-808 question answer

And given the code fragment:

1z0-808 question answer

What is the result?

A.

300:300200:300

B.

300:100200:300

C.

300:00:300

D.

100:300300:200

Full Access
Question # 19

Given the code fragment:

1z0-808 question answer

Test.java:

1z0-808 question answer

Which is the result?

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Full Access
Question # 20

Given:

1z0-808 question answer

And given the commands:

1z0-808 question answer

What is the result?

A.

Java SE

B.

Java EE

C.

Compilation fails at line n1.

D.

A NullPointerException is thrown at runtime.

Full Access
Question # 21

Given:

1z0-808 question answer

What is the result? A. 0:0

100:0

B.null:0

100:0

C.0:0

100:200

D.null:null 100:null

Full Access
Question # 22

Given:

1z0-808 question answer

What is the result?

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.

Full Access
Question # 23

Given:

1z0-808 question answer

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

Full Access
Question # 24

Given the following main method:

1z0-808 question answer

What is the result?

A.

5 4 3 2 1 0

B.

5 4 3 2 1

C.

4 2 1

D.

5

E.

Nothing is printed

Full Access
Question # 25

Given the code fragments:

1z0-808 question answer

Which modification enables the code to compile?

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 26

Which one of the following code examples uses valid Java syntax?

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 27

Which statement is true about the switch statement?

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.

Full Access
Question # 28

Given the code fragment:

1z0-808 question answer

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

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 29

Which two class definitions fail to compile? (Choose two.)

1z0-808 question answer

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Full Access
Question # 30

Given:

1z0-808 question answer

And:

1z0-808 question answer

What is the result?

A.

ns = 100 s =125

ns = 0 s = 125

ns = 125 s = 125

B.

ns = 50 s = 50

ns = 125 s = 125

ns = 0 s = 125

C.

ns = 50 s = 125 ns = 125 s = 125

ns = 0 s = 125

D.

ns = 50 s = 50 ns = 125 s =125

ns = 100 s =100

Full Access
Question # 31

Given the code fragment:

1z0-808 question answer

What is the result?

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.

Full Access
Question # 32

Given:

1z0-808 question answer

What is the result?

A.

10:20

B.

0:20

C.

Compilation fails at line n1

D.

Compilation fails at line n2

Full Access
Question # 33

Given the code fragment:

1z0-808 question answer

What is the result?

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Full Access
Question # 34

Given the code fragment:

1z0-808 question answer

What is the result?

A.

An exception is thrown at runtime.

B.

Compilation fails.

C.

13480.0

D.

13480.02

Full Access
Question # 35

Given the code fragment:

1z0-808 question answer

What is the result?

A.

[JavaForum, ExpertForum]

B.

[JavaGroup, ExpertGroup]

C.

[JavaForumGroup, ExpertForumGroup]

D.

[JavaGroup, TechGroup ExpertGroup]

Full Access
Question # 36

Given the code fragment:

1z0-808 question answer

What is the result?

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

Full Access
Question # 37

Given:

1z0-808 question answer

What is the result?

A.

Area is 6.0

B.

Area is 3.0

C.

Compilation fails at line n1

D.

Compilation fails at line n2.

Full Access
Question # 38

Given:

1z0-808 question answer

and the code fragment:

1z0-808 question answer

What is the result?

A.

true:false:true

B.

false:true:true

C.

false:true:false

D.

true:true:false

Full Access
Question # 39

Given this code for the classes MyException and Test:

1z0-808 question answer

What is the result?

A.

A

B.

AB

C.

A compile time error occurs at line n1.

D.

B

E.

I

Full Access
Question # 40

Given these classes:

1z0-808 question answer

And given this main method:

1z0-808 question answer

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

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;

Full Access
Question # 41

Which two class definitions fail to compile? (Choose two.)

1z0-808 question answer

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Full Access
Question # 42

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

1z0-808 question answer

and the code fragment:

1z0-808 question answer

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

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;

Full Access
Question # 43

Given these two classes:

1z0-808 question answer

Any amount of electricity used by a customer (represented by an instance of the Customer class) must contribute to the customer's bill (represented by the member variable bill) through the useElectricity method.

An instance of the Customer class should never be able to tamper with or decrease the value of the member variable bill.

How should you write methods in the ElectricAccount class at line n1 so that the member variable bill is always equal to the value of the member variable kwh multiplied by the member variable rate?

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 44

Given this segment of code:

1z0-808 question answer

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

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.

Full Access
Question # 45

Given:

1z0-808 question answer

Given the code fragment:

1z0-808 question answer

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

Full Access
Question # 46

Given the code fragment:

1z0-808 question answer

Which three code fragments are valid at line n1?

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Full Access
Question # 47

Given the code fragment:

1z0-808 question answer

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

A.

Line 7

B.

Line 8

C.

Line 9

D.

Line 10

E.

Line 11

F.

Line 12

Full Access
Question # 48

Given:

1z0-808 question answer

And given the commands:

1z0-808 question answer

What is the result?

A.

1 null

B.

true false

C.

false false

D.

true true

E.

A ClassCastException is thrown at runtime.

Full Access
Question # 49

Given:

1z0-808 question answer

What is the result?

A.

An exception is thrown at runtime.

B.

InitializedStartedInitialized

C.

InitializedStarted

D.

Compilation fails.

Full Access
Question # 50

Given:

1z0-808 question answer

What is the result?

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 51

Given the code fragment:

1z0-808 question answer

What is the result?

A.

2012-02-10

B.

2012-02-11

C.

Compilation fails

D.

A DateTimeException is thrown at runtime.

Full Access
Question # 52

Given:

1z0-808 question answer

What is the result?

A.

Good Luck!

B.

Good Day!

C.

Welcome!

D.

Hello!

Full Access
Question # 53

Given the code fragment:

1z0-808 question answer

Which two code fragments can be independently inserted at line n1 to enable the code to print the elements of the array in reverse order? (Choose two.)

1z0-808 question answer

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Full Access
Question # 54

Given:

1z0-808 question answer

And given the code fragment:

1z0-808 question answer

What is the result?

A.

Compilation fails at line n2.

B.

Compilation fails at line n1.

C.

20:20

D.

10:20

Full Access
Question # 55

Given the code fragment:

1z0-808 question answer

What is the result?

A.

1:2:3:4:5:

B.

1:2:3:

C.

Compilation fails.

D.

An ArrayOutOfBoundsException is thrown at runtime.

Full Access
Question # 56

Given the code fragment:

1z0-808 question answer

What is the result?

A.

100

B.

101

C.

102

D.

103

E.

Compilation fails

Full Access
Question # 57

Given the code fragment:

1z0-808 question answer

What is the result?

A.

true true

B.

true false

C.

false false

D.

false true

Full Access
Question # 58

Given:

1z0-808 question answer

And given the commands:

1z0-808 question answer

What is the result?

A.

Success

B.

Failure

C.

Compilation fails.

D.

An exception is thrown at runtime

Full Access
Question # 59

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.

Full Access
Question # 60

Given the code fragment:

1z0-808 question answer

What is the result?

A.

3

B.

4

C.

-1

D.

Compilation fails.

Full Access
Question # 61

Given the code fragment:

1z0-808 question answer

What is the result?

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 62

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?

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 63

Given:

1z0-808 question answer

What is the result?

A.

Compilation fails.

B.

3 5

C.

0 0

D.

9 25

Full Access
Question # 64

Given this class:

1z0-808 question answer

And given this main method, located in another class:

1z0-808 question answer

Which three lines, when inserted independently at line n1, cause the program to print a 0 balance?

A.

acct.setAmount(-acct.getAmount());

B.

acct.amount = 0;

C.

acct.setAmount(0);

D.

acct.getAmount() = 0;

E.

this.amount = 0;

F.

acct.changeAmount(0);

G.

acct.changeAmount(-acct.amount);

Full Access
Question # 65

Given:

1z0-808 question answer

What is the result?

A.

a, ei, i

B.

a, eo, o

C.

e, ei, i

D.

a, ao, o

Full Access
Question # 66

Given the code fragment:

1z0-808 question answer

Which two modifications should you make so that the code compiles successfully? (Choose two.)

1z0-808 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Full Access
Question # 67

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

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.

Full Access