@@ -0,0 +1,793 @@
+package oop;%0A%0A/**%0A * Created by igor on 14.06.2015.%0A */%0Apublic class Inh %7B%0A    public static void main(String%5B%5D args) %7B%0A        Point1d p1 = new Point2d(1,2);%0A        Point1d p2 = new Point3d(1,2,3);%0A%0A    %7D%0A%7D%0A%0Aclass Point1d %7B%0A    int x;%0A%0A    public Point1d(int x ) %7B%0A        this.x = x;%0A    %7D%0A%0A    public void print() %7B%0A        System.out.format(%22Point1d: %25d%5Cn%22, x);%0A    %7D%0A%7D%0A%0Aclass Point2d extends Point1d %7B%0A    int y;%0A%0A    public void print() %7B%0A        System.out.format(%22Point2d: %25d %25d%5Cn%22, x, y);%0A    %7D%0A%0A    public Point2d(int x, int y) %7B%0A       super(x);%0A    %7D%0A%7D%0A%0Aclass Point3d extends Point2d %7B%0A    int z;%0A%0A    public Point3d(int x, int y, int z) %7B%0A        super(x,y);%0A        this.z = z;%0A    %7D%0A%0A    public void print() %7B%0A        System.out.format(%22Point3d: %25d %25d %25d%5Cn%22, x, y,z);%0A    %7D%0A%7D%0A%0A

Add example Inheritance