摘要: 异常机制 异常指程序运行中出现的不期而至的各种情况 检查性异常/编译异常 用户错误 运行时异常 运行时异常有可能在编译时被忽略 NullPointerException ArithmeticException ArrayIndexOutOfBoundsException ClassCastExcep 阅读全文
posted @ 2022-12-15 19:58 5hithin 阅读(30) 评论(0) 推荐(0)
摘要: 内部类 一个java类中可以有多个class类,但只能有一个public类 成员内部类 public class outer{ private int id; public void out(){ System.out.println("."); } public class inner{ publ 阅读全文
posted @ 2022-12-15 19:57 5hithin 阅读(11) 评论(0) 推荐(0)
摘要: static import static java.lang.Math.radom;//静态导入包 public class person() { System.out.println("ananymous"); } static{ //静态代码块 //只执行一次 } 抽象类 //抽象类 publi 阅读全文
posted @ 2022-12-15 18:54 5hithin 阅读(26) 评论(0) 推荐(0)