Note: This quiz is designed only to assess if you are ready to join the
our Examlab SCJP/OCPJP training course.
This quiz will only show your score and your eligibility status, but does NOT necessarily provide answers, explanations,
or any other exam features.
1)Which one of the following statements is true about overriding a method?
2)Which of the following statements are true? (choose two)
3)Which of the followings ARE valid at the compile time? (choose three)
4)What would be the result of attempting to compile and run the following code fragment?
int x = 0, y = 1;
for(int z = x + y; z < 5; z+= y) {
System.out.print(++y + z);
}
5)What would be the result of attempting to compile and run the following code fragment?
class A {
static class B { }
static class C extends A { }
public static void main(String a[]) {
new A().go();
}
public void go() {
pr(this instanceof C);
pr(new C() instanceof A);
pr(new Object() instanceof A);
pr(this instanceof Object);
}
static void pr(Object o) {
System.out.print(o + " ");
}
}
6)Which of the following statements are true? (choose two)
7)Which of the following expressions return the current date/time in milliseconds? (choose two)
8)What would be the result of attempting to compile and run the following code fragment?
class A {
static void go(){ }
public static void main(String s[]) {
A a = null;
a.go();
}
}
9)Which of the following statements are true? (choose two)
10)Which of the followings are NOT Java operators? (choose two)
Your Score
80%
You are probably not eligible to take the course!
Congratulations! By scoring above 55%, you have proven for yourself that you are eligible
to take our OCPJP training course.
Hmm! It looks like you better improve your knowledge on Java basics before you join the course.
If you sign up for a free account, our
tutors would be able to guide you on how to improve your basic Java knowledge - all for free.