优于try和catch之前执行,无论是否异常都会执行 static int fun1(){ try{ return 1; }finally { System.out.println("finally"); } } // 输出 finally // 1 public static void main(String[] args) { System.out.println(fun1()); } public static int fun1() { int result = 0; try { …
public class 分派 { public static void main(String[] args) { Human man = new Man(); // 重写是 虚函数的源由(invokevirtual 所以对字段无效),看实际类型 即‘后者’ man.printCode(); // man.code是不是方法,所以输出是 Human.code即3 System.out.println("code " + man.code); // Human women = new Women…
启动: - nohup java -jar jenkins.war 停止: - ps -ef|grep jenkins.war - kill -9 6911