Friday, September 4, 2009

SCJP Questions

Given:
1 int index = 1;
2 int [] foo = new int [3]; 10.int bar = foo [index]; 11.int baz = bar + index; What is the result?
A. Baz has the value of 0
B. Baz has the value of 1
C. Baz has the value of 2
D. An exception is thrown.
E. The code will not compile.
Answer: B

0 comments:

Post a Comment

 

About

Site Info

Information Source

Academy of JAVA by Rajesh Rolen Copyright © 2009 Community is Developed by Rajesh Kumar Rolen WebSite

/* tracking code by yahoo login */