Skip to content
loading...

re: Why does this Java code keep throwing Exception in thread "main" at line 8 when line 8 is the declaration for the main method? VIEW POST

FULL DISCUSSION
 

Others have pretty much answered, but another thing is that you should try and catch an exception for ImageIO.read(File) since it can throw an IOException if the file is not found. This will require defining it in a method.

code of conduct - report abuse