Which two will compile, and can be run successfully using the command: Java fred1 hello
walls
A.
Option A
B.
Option B
C.
Option C
D.
Option D
Which two will compile, and can be run successfully using the command: Java fred1 hello
walls
A.
Option A
B.
Option B
C.
Option C
D.
Option D
BD
answer is correct C,D
C,D
Answer: C, D
Explanation:
B will compile but will fail while running because based on the numbers of args will throw an ArrayIndexOutOfBoundsException.
A will not compile because the type of argument declared for the main method is String and in the system out is trying to use it as an array.