public class test4 {public static void main(String[] args) {Class<?> cls =Class.forName("demo1.test4");}想問一下為什么這個主方法后不加throws Exception 會報錯,throws Exception不是會出現異常的情況才用的嗎?我這段代碼沒有出現異常的情況怎么也要加上throws Exception
添加回答
舉報
0/150
提交
取消