/* * @Description: * @Autor: kindring * @Date: 2021-09-15 13:53:34 * @LastEditors: kindring * @LastEditTime: 2021-09-15 13:53:35 * @LastDescript: */ class Point2 { protected double x; protected double y; Point2(double x, double y) { this.x = x; this.y = y; } public getPos() { System.out.println(this.x + " " + this.y); } } class Point3 extends Point2{ protected double z; Point2(double x, double y, double z) { super(x, y); this.z = z; } public getPos() { System.out.println(this.x + " " + this.y + " " + this.z); } }