abhay jain wrote: in this line what "thows" means ??? , strange thing is that there is no try , catch , finally in the program...... is that possible ???
Yes it is possible.
It means that some part of the method might throw a IOException and the invoking method should handle the exception.
It just declares that it might throw an IOException. If you're unsure what that means I would suggest you read this.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Declaring throws clause means that you are aware that this method might throw an IOException but you don't want to handle it. If some other method calls this method that that method has to either handle it (try-catch) or again throw it.
In your case since the main method is throwing the exception, if the exception occurs the program will just print stacktrace and exit.