-->
当前位置:首页 > 题库

单选题:What will be printed out if this code is run with the following

Luz5年前 (2021-05-10)题库1227
What will be printed out if this code is run with the following command line?

**java myprog good morning**
```Java
public class myprog{
public static void main(String argv[]) {
System.out.println(argv[2])
}
}
```
@[D](2)

A. Myprog
B. Good
C. Morning
D. Exception raised: "java.lang.ArrayIndexOutOfBoundsException: 2"



A.Myprog
B.Good
C.Morning
D.Exception raised: "java.lang.ArrayIndexOutOfBoundsException: 2"


答案:D