O'Reilly logo

A Programmer’s Guide to Java® SE 8 Oracle Certified Associate (OCA) by Rolf W Rasmussen, Khalid A Mughal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix E. Mock Exam: Java SE 8 Programmer I

This is a mock exam for the Java SE 8 Programmer I exam. It comprises brand-new questions, which are similar to the questions that can be expected on the real exam. Working through this exam will give you a good indication of how well you are prepared for the real exam, and whether any topics need further study. Annotated answers to the questions can be found in Appendix F.

Questions

Q1 Which expression statements, when inserted at (1), will cause the following class to compile without errors?

public class Q6db8 {   private int a;   private int b = 0;   private static int c;   public void m() {     int d;     int e = 0;     // (1) INSERT CODE HERE.   } }

Select the four correct answers.

(a)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required