posted 14 years ago
Your code might be subject to exceptions. But you would never know, for two reasons:
Your catch block ignores themYou are using a PrintWriter, which ignores exceptions
You can fix the first problem like this:
And you can fix the second problem by using a BufferedWriter rather than a PrintWriter.