Given the following class definition, which command will output the message test-test?
package mypkg; public class MyClass { public static void main(String... theInput) { System.out.print(theInput[2]); } }
C.
The application prints the third argument of the input methods.
Note that double quotes "" can be used to group input arguments.
The third argument of Option A is test-test deer.
The third argument of Option B is 3.
The third argument of Option C is test-test, making it the correct answer.
Option D only has two input arguments, leading to an ArrayIndexOutOfBoundsException trying to read the third argument at runtime.