Friday, September 4, 2009

SCJP Questions

Given:
1 public class test(
2 public static void main(string[]args){
3 string foo = args [1];
4 string foo = args [2];
5 string foo = args [3];
6 }
7 }
And command line invocation:
Java Test red green blue
What is the result?
A. Baz has the value of ""
B. Baz has the value of null
C. Baz has the value of "red"
D. Baz has the value of "blue"
E. Bax has the value of "green"
F. The code does not compile.
G. The program throws an exception.
Answer: G

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 */