posted 22 years ago
Jordi
The obvious answer is because a lot of the I/O methods can throw that exception, so you must catch ot or re-throw it for your code to compile.
If your asking why do they throw these exceptions then it is most likely because there are numerous reasons that I/O can fail (bad file names, bad paths, and any number of other reasons). The system has to have some way of letting you know that, for one reason or another, what you were trying to do has failed. If it didn't you'd never know if it was your code, the disk, a bad name, etc...
not sure if that answered your question
let me know if not
------------------
Dave
Sun Certified Programmer for the Java� 2 Platform