我是Java编程新手。为什么我会收到'ArrayIndexOutOfBoundsException'错误?
有人能帮助我用下面的代码:
public class RandomSeq {
\t public static void main(String[] args) {
\t \t // command-line argument
\t \t int N = Integer.parseInt(args[0]);
\t \t // generate and print N numbers between 0 and 1
\t \t for (int i = 0; i < N; i++) {
\t \t \t System.out.println(Math.random());
\t \t }
\t }
}
我收到在编译的时候出现以下错误信息:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
预先感谢您。
[1]我使用64位Java 8(更新25)SE实现,使用64位Eclipse IDE for Java Developers(v。4.4.1)。
你如何启动应用程序? – 2014-10-17 04:55:46