giovedì 28 marzo 2013

Q66

Which two will compile, and can be run successfully using the command:
java Fred1 hello walls
 
A.
 class Fred1{ public static void main (String args) { System.out.println(args[1]); } } 
 
B.
 class Fred1{ public static void main (String [] args) { System.out.println(args[1]); } } 
 
C.
 class Fred1 { public static void main (String [] args) { System.out.println (args); } } 
 
D.
 class Fred1 { public static void main (String [] args) { System.out.println (args [2]); } }
Risposta : B,C

Nessun commento:

Posta un commento