When I run the whole program I get this error:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at input.main(input.java:176)
I understand it is telling me that the line "FileOutputStream outFile = new FileOutputStream(args[0]);" is erroring because args[0] is out of bounds. The problem is I don't know why.
Help?
Thanks in advance,
Bogren
try {
FileOutputStream outFile = new FileOutputStream(args[0]);
OutputStreamWriter outStream = new OutputStreamWriter(outFile,(Fname+Mname+Lname));
PrintWriter out = new PrintWriter(outFile);
out.println(Fname);
out.println(Mname);
out.println(Lname);
out.println(gender);
out.println(noun);
for(int i = 0; i <20; i++)
out.println(movies[i]);
for(int i = 0; i <20; i++)
out.println(music[i]);
for(int i = 0; i <20; i++)
out.println(books[i]);
for(int i = 0; i <20; i++)
out.println(tv[i]);
for(int i = 0; i <20; i++)
out.println(games[i]);
for(int i = 0; i <20; i++)
out.println(activities[i]);
for(int i = 0; i <20; i++)
out.println(dislikes[i]);
out.close();
} catch (IOException e)
{
e.printStackTrace();
}










