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

1Z0-808 Online Practice Questions and Answers

Questions 4

Given the code fragment:

What is the result?

A. 20

B. 25

C. 29

D. Compilation fails

E. AnArrayIndexOutOfBoundsException is thrown at runtime

Buy Now
Questions 5

Given the code fragment:

public class ForTest {

public static void main(String[] args) {

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

for ( foo ) {

}

}

Which three code fragments, when replaced individually for foo, enables the program to compile?

A. int i : array

B. int i = 0; i < 1;

C. ; ;

D. ; i < 1; i++

E. i = 0; i<1;

Buy Now
Questions 6

Given the code fragment:

int b = 3;

if ( !(b > 3)) {

System.out.println("square ");

}{

System.out.println("circle ");

}

System.out.println("...");

What is the result?

A. square...

B. circle...

C. squarecircle...

D. Compilation fails.

Buy Now
Questions 7

Which three statements are benefits of encapsulation?

A. Allows a class implementation to change without changing t he clients

B. Protects confidential data from leaking out of the objects

C. Prevents code from causing exceptions

D. Enables the class implementation to protect its invariants

E. Permits classes to be combined into the same package

F. Enables multiple instances of the same class to be created safely

Buy Now
Questions 8

Given:

What is the result?

A. Null

B. Compilation fails

C. An exception is thrown at runtime

D. 0

Buy Now
Questions 9

Given the code fragment: System.out.println(2 + 4 * 9 - 3); //Line 21 System.out.println((2 + 4) * 9 - 3); // Line 22 System.out.println(2 + (4 * 9) - 3); // Line 23 System.out.println(2 + 4 * (9 - 3)); // Line 24 System.out.println((2 + 4 * 9) - 3); // Line 25 Which line of codes prints the highest number?

A. Line 21

B. Line 22

C. Line 23

D. Line 24

E. Line 25

Buy Now
Questions 10

Given:

A. ns = 50 S = 125 ns = 125 S = 125 ns = 100 S = 125

B. ns = 50 S = 125 ns = 125 S = 125 ns = 0 S = 125

C. ns = 50 S = 50 ns = 125 S = 125 ns = 100 S = 100

D. ns = 50 S = 50 ns = 125 S = 125 ns = 0 S = 125

Buy Now
Questions 11

Which usage represents a valid way of compiling java source file with the name "Main"?

A. javac Main.java

B. java Main.class

C. java Main.java

D. javac Main

E. java Main

Buy Now
Questions 12

Given the code fragment:

What is the result?

A. An exception is thrown at runtime.

B. 07-31-2014

C. 2014-07-31

D. 2014-09-30

Buy Now
Questions 13

Given:

What is the result?

A. c= b = false f = 0.0

B. c = null b = true f = 0.0

C. c = 0 b = false f = 0.0f

D. c = null b = false f = 0.0F

Buy Now
Exam Code: 1Z0-808
Exam Name: Java SE 8 Programmer I
Last Update: Mar 18, 2024
Questions: 385
10%OFF Coupon Code: SAVE10

PDF (Q&A)

$45.99

VCE

$49.99

PDF + VCE

$59.99