摘要:
异常 捕获异常 package com.exception; public class Test2 { public static void main(String[] args) { int a = 1; int b = 0; //假设要捕获多个异常:从小到大! //快捷键Ctrl+Alt+T 自 阅读全文
摘要:
接口 package com.oop.demo10; //interface 定义的关键字,接口都需要有实现类 public interface UseService { //常量 public static final (一般不会在接口中定义常量) int AGE = 99; //接口中的所有定义 阅读全文
摘要:
多态 package com.oop.demo06; public class Person { public void run(){ System.out.println("run"); } } package com.oop.demo06; public class Student extend 阅读全文