SCJP Test 1 - Online Test

Test Difficulty Level: Medium

Syllabus of Test

Questions based on SCJP

Sample Question from this online test:

Question: 1.public class Test {
2.public static void main(String args[]) {
3.class Foo {
4.public int i = 3;
5.Object o = (Object)new Foo();
6.Foo foo = (Foo)o;
7.System.out.println(“i = “ + foo.i);
What is the result

Option A: i = 3

Option B: Compilation fails

Option C: A ClassCastException is thrown at line 6

Option D: A ClassCastException is thrown at line 7

To answer, click the "Start This Test" button below.

Start this Test


vijay patil on 2011-05-30 15:31:05 wrote,

good luck

Amaravathi A on 2012-05-09 07:20:58 wrote,

Try correct ur font problem,, some coding r not readable

krishna chaitanya on 2012-05-23 05:45:51 wrote,

Try correct ur font problem,, some coding r not readable

ajay rajpoot on 2012-06-13 18:35:12 wrote,

some question is not readable .so at the time of solving we are getting
irritation plz rectify ....

mamata behera on 2012-07-31 11:42:30 wrote,

Font is not readble so try to rectify it

divya puvvada on 2012-08-02 08:07:51 wrote,

in question no:15 what is that option c.....
font is not readable...
plese provide explanation along with correct answer

thank u

Makara Reddy on 2012-08-08 11:21:30 wrote,

Questiona are good.
Explanation along with correct answer would be of great help.


jai krishnan on 2013-04-11 14:07:09 wrote,

I come across
this much of mis-fonts
System.out.println(�f2[0]= � + f2[0]);????????

yashodhara dad on 2013-04-30 01:43:35 wrote,

its true some coding r not readable unable to understand.....nice experience

Narsi N on 2013-08-03 09:11:48 wrote,

html characters are not diplayed properly. It's very hard to understand. Egfor ( foo(�A�); foo(�B�)&&(i<2); foo(�C�)){
9. i++ ;
10. foo(�D�);