@@ -0,0 +1,694 @@
+%0Aimport java.util.*;%0Aimport java.lang.*;%0Aimport java.io.*;%0Aclass SuperClass%7B%0A%09int i;%0A%09int j;%0A%09void displayij()%0A%09%7B%0A%09%09System.out.println(%22i and J %22+i+%22 %22+j);%0A%09%7D%0A%7D%0A%0Aclass SubClass extends SuperClass%7B%0A%09int k;%0A%09void displayk()%7B%0A%09%09System.out.println(%22Value of k%22+k);%0A%09%7D%0A%7D%0A%09%0A%09%0A%09%0A/* Name of the class has to be %22Main%22 only if the class is public. */%0Aclass DemoInheritance%0A%7B%0A%09public static void main (String%5B%5D args) throws java.lang.Exception%0A%09%7B%0A%09%09SuperClass super_obj = new SuperClass();%0A%09%09super_obj.i = 100;%0A%09%09super_obj.j = 200;%0A%09%09super_obj.displayij();%0A%09%09SubClass sub_obj = new SubClass();%0A%09%09sub_obj.i = 500;%0A%09%09sub_obj.j = 600;%0A%09%09sub_obj.k = 700;%0A%09%09sub_obj.displayij();%0A%09%09sub_obj.displayk();%0A%09%09%0A%09%7D%0A%7D%0A

Create DemoInheritance.java