I think this is basic stuff but i'm not sure what to do. Why do I get IOException never thrown in body of corresponding try statement
public static void main(String[] args)
{
File inputFile = null ;
try
{
inputFile = new File("records.txt") ;
}
catch (IOException e)
{
System.out.print("file not found!") ;
}
The File constructor in itself doesn't do very much.
It is not until you actually start doing actual operations that IOExceptions can be thrown.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With