Exam2pass
0 items Sign In or Register
  • Home
  • IT Exams
  • Guarantee
  • FAQs
  • Reviews
  • Contact Us
  • Demo
Exam2pass > Oracle > Oracle Certifications > 1Z0-808 > 1Z0-808 Online Practice Questions and Answers

1Z0-808 Online Practice Questions and Answers

Questions 4

Given:

public class Test {

static boolean bVar;

public static void main(String[] args) {

boolean bVar1 = true;

int count =8;

do {

System.out.println("Hello Java! " +count);

if (count >= 7) {

bVar1 = false;

}

} while (bVar != bVar1 andand count > 4);

count -= 2;

}

}

What is the result?

A. Hello Java! 8 Hello Java! 6 Hello Java! 4

B. Hello Java! 8 Hello Java! 6

C. Hello Java! 8

D. Compilation fails

Buy Now

Correct Answer: C

Explanation: Hello Java! 8

Questions 5

Given: Which constructor initializes the variable x3?

A. Only the default constructor of class X

B. Only the no-argument constructor of class Y

C. Only the no-argument constructor of class Z

D. Only the default constructor of object class

Buy Now

Correct Answer: C

Questions 6

Given:

A. a, e i, i

B. a, e o, o

C. e, e i, i

D. a, a o, o

Buy Now

Correct Answer: A

Questions 7

Given the code fragment:

Which modification enables the code to print 54321?

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

B. At line 7, insert x --;

C. Replace line 6 with --x; and, at line 7, insert system, out. print (x);

D. Replace line 12 With return (x > 0) ? false: true;

Buy Now

Correct Answer: B

Questions 8

Given: A. X XX

B. X Y X

C. Y Y X

D. Y YY

Buy Now

Correct Answer: D

Questions 9

Given the following class:

And given the following main method, located in another class:

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

A. this.amount = 0;

B. acct.setAmount(0);

C. acct (0) ;

D. acct.amount = 0;

E. acct. getAmount () = 0;

F. acct.changeAmount(0);

G. acct.changeAmount(-acct.amount);

H. acct.changeAmount(-acct.getAmount());

Buy Now

Correct Answer: BDG

Questions 10

Given the code fragments:

And,

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.

Buy Now

Correct Answer: C

Questions 11

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

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

Correct Answer: BE

Reference: https://stackoverflow.com/questions/1200621/how-do-i-declare-and-initialize-an-array-in-java

Questions 12

Given:

What is the result?

A. Vehicle Bus

B. Bus Vehicle

C. Bus

D. The program doesn't print anything

Buy Now

Correct Answer: A

Questions 13

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

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

Correct Answer: AC

Exam Code: 1Z0-808
Exam Name: Java SE 8 Programmer I
Last Update: Jun 12, 2025
Questions: 385

PDF (Q&A)

$45.99
ADD TO CART

VCE

$49.99
ADD TO CART

PDF + VCE

$59.99
ADD TO CART

Exam2Pass----The Most Reliable Exam Preparation Assistance

There are tens of thousands of certification exam dumps provided on the internet. And how to choose the most reliable one among them is the first problem one certification candidate should face. Exam2Pass provide a shot cut to pass the exam and get the certification. If you need help on any questions or any Exam2Pass exam PDF and VCE simulators, customer support team is ready to help at any time when required.

Home | Guarantee & Policy |  Privacy & Policy |  Terms & Conditions |  How to buy |  FAQs |  About Us |  Contact Us |  Demo |  Reviews

2025 Copyright @ exam2pass.com All trademarks are the property of their respective vendors. We are not associated with any of them.