I'm getting an ArrayIndexOutOfBoundsException: 0
error.
Here is a small snippet:
public static void main(String[] args){
try{
Fileread = new BufferedReader(new FileReader(args[0]));
}
catch(FileNotFoundException e){
System.out.println("Error reading in file");
System.exit(1);
}
I'm reading in a text file that is 50+ lines. I am somewhat new to just using args[]
array to read in initial input. So forgive me for my lack of knowledge.