- What happens when the following program is compiled and then the command "java check it out" is executed. Select the one correct answer.
- The program does not compile.
- The program compiles but generates ArrayIndexOutOfBoundsException exception.
- The program prints java
- The program prints check
- The program prints it
- The program prints out
class check {
public static void main(String args[]) {
System.out.println(args[args.length-2]);
}
}
========================
e. The args array consists of two elements "it" and "out". args.length is set to two.