父类 public class Father { public Father() { System.out.println("父类构造PUBLIC father"); } static { System.out.println("父类静态代码块static father"); } { System.out.println("父类普通代码块CLASS father"); } } 子类 public class Son extends Father
视屏讲解:https://www.bilibili.com/video/av48196406/?p=4 命令行运行Java代码 (1)使用记事本新建文本文件[Test.java]. 注意,默认状态下Windows操作系统不显示文件后缀名,默认后缀名是txt,需要让系统显示后缀名,再把txt改为java. (2)文件中编写如下代码: public class Test { public static void main(String[] args) { System.out.println("He