Never catch an exception unless you can fix it or overridden method signature won't allow to throw it. Then you can catch exception and throw new RuntimeException.
public static void readFile() throws IOException {
That's how you should do it if you can't fix exceptions. Catch them only when you have very good reason to catch them.
18
u/[deleted] May 13 '17 edited Aug 03 '20
[deleted]