What will happen if you try to compile and run the following code
public class MyClass {
public static void main(String arguments[]) {
amethod(arguments); }
public void amethod(String[] arguments) {
System.out.println(arguments);
System.out.println(arguments[1]);
}}
发布于 2021-02-15 03:24:26
【单选题】 A error Can't make static reference to void amethod B error method main not correct C error array must include parameter D amethod must be declared with String