摘要: /** * 关闭资源,按获取顺序倒序关闭 */ public static void closeAll(AutoCloseable... closeables) { for (AutoCloseable closeable : closeables) { try { if (closeable != 阅读全文
posted @ 2023-03-29 10:44 丶Ronnie 阅读(39) 评论(0) 推荐(0)
摘要: //手动抛异常 try { int age = Integer.parseInt("20L"); System.out.println(age); } catch (Exception e) { e.printStackTrace(); } 阅读全文
posted @ 2023-03-29 10:40 丶Ronnie 阅读(19) 评论(0) 推荐(0)