O'Reilly logo

A Programmer’s Guide to Java™ SCJP Certification: A Comprehensive Primer, Third Edition 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 F Mock Exam

This is a mock exam for Sun Certified Programmer for the Java Platform Standard Edition 6 (SCJP 1.6). 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 the reader a good indication of how well she is prepared for the real exam, and whether any topics need further study.

Questions

Q1 Given the following class, which statements can be inserted at (1) without causing a compilation error?

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

Select the four correct answers.

(a) a++;

(b) b++; ...

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