DON'T WANT TO MISS A THING?

Certification Exam Passing Tips

Latest exam news and discount info

Curated and up-to-date by our experts

Yes, send me the newsletter

Best Oracle 1Z0-808 Practice Exams and Real Exam Simulations, Java SE 8 Programmer I | SPOTO

Take other online exams

Question #1
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
View answer
Correct Answer: C
Question #2
Given the code fragment: Assume that the system date is June 20, 2014. What is the result?
A. Option A
B. Option B
C. Option C
D. Option D
View answer
Correct Answer: D
Question #3
Given the code fragment: What is the result?
A. Compilation fails
B. 0 Found
C. 1 Found
D. 3 Found
View answer
Correct Answer: E
Question #4
Given the code from the Greeting.Java file: Which set of commands prints Hello Duke in the console?
A. Option A
B. Option B
C. Option C
D. Option D
View answer
Correct Answer: E
Question #5
What is the name of the Java concept that uses access modifiers to protect variables and hide them within a class?
A. Encapsulation
B. Inheritance
C. Abstraction
D. Instantiation
E. Polymorphism
View answer
Correct Answer: A
Question #6
Given: What is the result?
A. 10 : 30 : 6
B. 10 : 22 : 22
C. 10 : 22 : 20
D. 10 : 22 : 6
View answer
Correct Answer: CD
Question #7
Which statement best describes encapsulation?
A. Encapsulation ensures that classes can be designed so that only certain fields and methods of an object are accessible from other objects
B. Encapsulation ensures that classes can be designed so that their methods are inheritable
C. Encapsulation ensures that classes can be designed with some fields and methods declared as abstract
D. Encapsulation ensures that classes can be designed so that if a method has an argument MyType x, any subclass of MyType can be passed to that method
View answer
Correct Answer: C
Question #8
Given: What is the result?
A. 3 4 5 6
B. 3 4 3 6
C. 5 4 5 6
D. 3 6 4 6
View answer
Correct Answer: A
Question #9
Given: Which code fragment can replace the if block?
A. Option A
B. Option B
C. Option C
D. Option D
View answer
Correct Answer: A
Question #10
Which two statements are true about Java byte code? (Choose two.)
A. It can be serialized across network
B. It can run on any platform that has a Java compiler
C. It can run on any platform
D. It has “
E. It can run on any platform that has the Java Runtime Environment
View answer
Correct Answer: D
Question #11
Given the code fragment: What is the result?
A. 2 4
B. 0 2 4 6
C. 0 2 4
D. Compilation fails
View answer
Correct Answer: C
Question #12
Which statement is true about Java byte code?
A. It can run on any platform
B. It can run on any platform only if it was compiled for that platform
C. It can run on any platform that has the Java Runtime Environment
D. It can run on any platform that has a Java compiler
E. It can run on any platform only if that platform has both the Java Runtime Environment and a Java compiler
View answer
Correct Answer: AE
Question #13
Given this segment of code: 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
View answer
Correct Answer: C
Question #14
Given: What is the result?
A. BaseDerivedA
B. BaseDerivedB
C. DerivedBDerivedB
D. DerivedBDerivedA
E. A ClassCastException is thrown at runtime
View answer
Correct Answer: A
Question #15
Which one of the following code examples uses valid Java syntax?
A. Option A
B. Option B
C. Option C
D. Option D
View answer
Correct Answer: A
Question #16
Given the code fragment: What is the result?
A. 100
B. 101
C. 102
D. 103
E. Compilation fails
View answer
Correct Answer: A
Question #17
Given the code fragment: Which two modifications, made independently, enable the code to compile? (Choose two.)
A. Make the method at line n1 public
B. Make the method at line n2 public
C. Make the method at line n3 public
D. Make the method at line n3 protected
E. Make the method at line n4 public
View answer
Correct Answer: A
Question #18
Given the code fragment: What is the result?
A. Compilation fails
B. Hi removed
C. An UnsupportedOperationException is thrown at runtime
D. The program compiles, but it prints nothing
View answer
Correct Answer: D

View Answers after Submission

Please submit your email and WhatsApp to get the answers of questions.

Note: Please make sure your email ID and Whatsapp are valid so that you can get the correct exam results.

Email:
Whatsapp/phone number: