| Author |
Exception errror in a program
|
aman goyal
Greenhorn
Joined: Nov 29, 2009
Posts: 5
|
|
This is the program:-
I am getting this error:-
Caught exception java.lang.ArrayIndexOutOfBoundsException: 0
Please help me to rectify the error
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
|
Next time UseCodeTags. I have added them for you.
|
[My Blog]
All roads lead to JavaRanch
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
Posting the full stack trace would help a lot. It contains the exact line where the exception was raised.
|
 |
Evan Caballero
Ranch Hand
Joined: Dec 10, 2009
Posts: 59
|
|
perhaps there is a mistakes here : fis = new FileInputStream(args[0]);
If you do not pass any arguments to your program, the args array will be of length 0, so there won't be any element à index 0.
|
 |
 |
|
|
subject: Exception errror in a program
|
|
|