所以当我编译时,一切都会编译得很好。
当我运行该程序时,出现此错误
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at ClientForNoDupCollection.main(ClientForNoDupCollection.java:20)
我去看第20行(实际上是19-21)
public static void main(String args[]) {
File file = new File(args[0]);
Scanner cReader = null;
我正在尝试能够通过命令行执行这些文件。
我不能 100% 确定我哪里出错了。
最佳答案
关于java - 数组越界,参数问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7869867/