摘要:
1、求1-n的和 public static int getSum(int n) { if(n == 1) return 1; return n+getSum(n-1); } public static void main(String[] args){ System.out.println(get 阅读全文
posted @ 2021-02-22 21:06
lucascube
阅读(1386)
评论(0)
推荐(0)
摘要:
异常: 继承体系: Exception继承自Throwable Error继承自Throwable RuntimeException继承自Exception 处理异常的方法: 1、在方法名最后加上throws 异常名,将异常抛给上一层,最终会由main方法抛给JVM 2、用try catch fin 阅读全文
posted @ 2021-02-22 07:57
lucascube
阅读(45)
评论(0)
推荐(0)

浙公网安备 33010602011771号