结果 I'm abstract class. I am non abstract method in the abstract class. I override from abstract class从上面的例子可以看到,抽象类可以有构造器,有抽象方法和非抽象方法,可以有变量。非抽象方法,子类可以直接继承;而抽象方法子类必须实现。2.2 使用场景1...
out.println("logging::"+str); } } public class InterfaceTest1 implements Interface1 { @Override public void method1(String str) { System.out.println("implement the method in interface1 "+str); } public static void main(String[] args) { InterfaceTest1 test = new InterfaceTest1(); test.l...