Oracle 1Z0-808 Online Practice
Questions and Exam Preparation
1Z0-808 Exam Details
Exam Code
:1Z0-808
Exam Name
:Java SE 8 Programmer I
Certification
:Oracle Certifications
Vendor
:Oracle
Total Questions
:385 Q&As
Last Updated
:May 24, 2026
Oracle 1Z0-808 Online Questions &
Answers
Question 231:
Consider following interface.
Which of the following will create instance of Runnable type?
A. Runnable run = 0 -> {System.out.println("Run");} B. Runnable run = 0 -> System.outprintlnfRun"); C. Runnable run = 0 > System.outprintlnfRun"); D. Runnable run = > System.ouLprintlnfRun"}; E. None of the above.
A. Runnable run = 0 -> {System.out.println("Run");}
Explanation/Reference:
Option A is the correct answer.
To create we have used following method with LocalDate class; public static LocalDate of(intyear, int month, intdayOfMonth) Here we need to remember that month is not zero based so if you pass 1 for month, then month will be January.
Then we have used period object of 1 day and add to date object which makes current date to next day, so final output is 2015-03-27. Hence option A is correct.
Question 232:
Given the code fragment: Which action enables the code to print Helping... Done?
A. replace class Humanoid extends Robot { with abstract class Humanoid extends Robot { B. replace interface Speakable { with abstract class Speakable C. replace public void process(); with public abstract void process(); D. replace abstract class Robot implements Speakable { with class Robot extends Speakable {
C. replace public void process(); with public abstract void process();
Explanation/Reference:
Question 233:
Which is true about the switch statement?
A. Its expression can evaluate to a collection of values. B. The break statement, at the end of each case block, is optional. C. Its case label literals can be changed at runtime. D. It must contain the default section.
B. The break statement, at the end of each case block, is optional.
Which set of changes enable the code to print 1, true?
A. Replacing with index > 0 and replacing with index--; B. Replacing with index > 0 and replacing with --index; C. Replacing with index > 5 and replacing with --index ; D. Replacing with index and replacing with --index ;
A. Replacing with index > 0 and replacing with index--;
Explanation/Reference:
Note: Code in B (code2 is --index;). also works fine.
Question 235:
Given:
What is the result?
A. hEllOjAvA! B. Hello java! C. Out of limits hEllOjAvA! D. Out of limits
C. Out of limits hEllOjAvA!
Question 236:
Given:
public class ComputeSum {
public int x;
public int y;
public int sum;
public ComputeSum (int nx, int ny) {
x = nx; y =ny;
updateSum();
}
public void setX(int nx) { x = nx; updateSum();}
public void setY(int ny) { x = ny; updateSum();}
void updateSum() { sum = x + y;}
}
This class needs to protect an invariant on the sum field.
Which three members must have the private access modifier to ensure that this invariant is maintained?
A. The x field B. The y field C. The sum field D. The ComputerSum ( ) constructor E. The setX ( ) method F. The setY ( ) method
C. The sum field E. The setX ( ) method F. The setY ( ) method
Explanation/Reference:
The sum field and the two methods (setX and SetY) that updates the sum field.
Question 237:
Given: What is the result?
A. Base DerivedA B. Base DerivedB C. DerivedB DerivedB D. DerivedB DerivedA E. A ClassCastException is thrown at runtime.
C. DerivedB DerivedB
Explanation/Reference:
Question 238:
Given the following code:
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
C. 15, 30, 75, 60, 90
Question 239:
Given:
What is the result?
A. Option A B. Option B C. Option C D. Option D
B. Option B
Question 240:
Which two actions will improve the encapsulation of a class?
A. Changing the access modifier of a field from public to private B. Removing the public modifier from a class declaration C. Changing the return type of a method to void D. Returning a copy of the contents of an array or ArrayList instead of a direct reference
A. Changing the access modifier of a field from public to private D. Returning a copy of the contents of an array or ArrayList instead of a direct reference
Nowadays, the certification exams become more and more important and required by more and more
enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare
for the exam in a short time with less efforts? How to get a ideal result and how to find the
most reliable resources? Here on Vcedump.com, you will find all the answers.
Vcedump.com provide not only Oracle exam questions,
answers and explanations but also complete assistance on your exam preparation and certification
application. If you are confused on your 1Z0-808 exam preparations
and Oracle certification application, do not hesitate to visit our
Vcedump.com to find your solutions here.