0

Hi guys...I am currently writing a program and it compiles fine but when I run it it says...

Problem with input/output
IOException:Null
Problem with input/output
IOException:Null

I have two files in it and I dont know what to check anymore...Anyone have any idea on what I need to look at?

3
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by mzd12111
0

Look through the files for a try-catch block for an IOException and an output message matching what you've shown us. We can't really do much without seeing the code or where the error is coming from.

If you have more than one catch block with that message, you can trace it using something like this:

catch(IOException e){
  e.printStackTrace();
  // whatever else here
}

and it'll tell you where the error is happening.

0

Beacuse I/O handling Throws Exception , and java cannot handle these kind of Exceptions automatically , as a result , you must manipulate your code and put your code (that part which you work with I/O) in a try block and catch Exception , it means :

try {
.....
.....
.....
}

catch (Exception e){
.....
what you want when an exception Occur
.....
}

notice that Catch block MUST appear right after the Try block , whithout any code between

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.