I am trying to get the user input using the following code but on running it gives the error that Arrayindexoutofbounds. Don't know what is the problem.
public static void main(String[] args) {
int T = Integer.parseInt(args[1]);
PercolationStats stats = new PercolationStats(
Integer.parseInt(args[0]), T);
double mean = stats.mean();
StdOut.println("mean = " + mean);
double stddev = stats.stddev();
StdOut.println("stddev = " + stddev);
double d = (1.96 * stddev) / Math.sqrt(T);
StdOut.println("95% confidence interval = " + (mean - d) + ", "
+ (mean + d));
}