can you please why error comes in line 13 as unreported exception ,must be caught pr declared to be thrown
class Demo { public static void main(String args[]
You need to add a throws to the method that throws exceptions as mentioned before as well as all the methods that call that method
throws