point.java

来自「清华大学辛运帏java程序设计第二版源代码」· Java 代码 · 共 18 行

JAVA
18
字号
class Point {
	void print() {
		System.out.println("This is the superclass!");
	}

	public static void main(String args[]){
		Point superp = new Point ();
		superp.print();
		Point3d subp = new Point3d();
		subp.print();
	}
}
class Point3d extends Point {
	void print() {
	System.out.println("This is the subclass!");
}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?