1.

What will be the output of the program? Note: The command line invocation is > java X a b public class X { public static void main(String [] args) { String names [] = new String[5]; for (int x=0; x < args.length; x++) names[x] = args[x]; System.out.println(names[2]); } }

A. Names
B. Null
C. Compilation fails
D. An exception is thrown at runtime
Answer» C. Compilation fails


Discussion

No Comment Found