I'm new to Java programming.
Can someone assist me with the following code:
public class RandomSeq {
public static void main(String[] args) {
// command-line argument
int N = Integer.parseInt(args[0]);
// generate and print N numbers between 0 and 1
for (int i = 0; i < N; i++) {
System.out.println(Math.random());
}
}
}
I receive the following error message when trying to compile:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
Thank you in advance.
[1] I use a 64-bit Java 8 (Update 25) SE implementation, using a 64-bit Eclipse IDE for Java Developers (v. 4.4.1).