Why I m getting Unreported Exception

后端 未结 2 1687
[愿得一人]
[愿得一人] 2021-01-29 15:33

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[]         


        
2条回答
  •  臣服心动
    2021-01-29 15:34

    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

提交回复
热议问题