Oracle Java SE 8 Programmer I - 1z0-808 Exam Practice Test

Given:

What will be the output?
Correct Answer: D Vote an answer
Given:

What is the output?
Correct Answer: A Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
Given the code fragment:

Which code fragment, when inserted at line 9, enables the code to print true?
Correct Answer: A Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
Which statement is true about Java byte code?
Correct Answer: A Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
Given:

What is the result?
Correct Answer: D Vote an answer
Given:
abstract class A1 {
public abstract void m1();
public void m2() { System.out.println("Green"); }
}
abstract class A2 extends A1 {
public abstract void m3();
public void m1() { System.out.println("Cyan"); }
public void m2() { System.out.println("Blue"); }
}
public class A3 extends A2 {
public void m1() { System.out.println("Yellow"); }
public void m2() { System.out.println("Pink"); }
public void m3() { System.out.println("Red"); }
public static void main(String[] args) {
A2 tp = new A3();
tp.m1();
tp.m2();
tp.m3();
}
}
What is the result?
Correct Answer: D Vote an answer
Which two actions will improve the encapsulation of a class?
Correct Answer: A,D Vote an answer
Give:

What is the result?
Correct Answer: C Vote an answer
Given the code fragment:

Which option represents the state of the num array after successful completion of the outer loop?
Correct Answer: B Vote an answer