point1.java
来自「清华大学辛运帏java程序设计第二版源代码」· Java 代码 · 共 19 行
JAVA
19 行
class Point1 {
void print() {
System.out.println("This is the superclass!");
}
public static void main(String args[]){
Point1 superp = new Point1 ();
superp.print();
Point3d subp = new Point3d();
subp.print();
}
}
class Point3d extends Point1 {
void print() {
System.out.println("This is the subclass!");
super.print();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?