What is the output of the following when run as java Count 1 2?
public class MyClass { public static void main(String target[]) { System.out.println(target.length); } }
C.
The name of the program is MyClass and there are two arguments.
Therefore, the program outputs 2, and Option C is correct.