class super_8{
int x;
void fun_1(){
System.out.println("x::"+x);
}
}
class sub extends super_8{
int y;
void fun_2(){
System.out.println("x::"+x);
System.out.println("y::"+y);
}
}
public class Inheritance {
public static void main(String[]args)
{
super_8 a=new super_8();
a.x=11;
a.fun_1();
sub a1=new sub();
a1.x=12;
a1.y=13;
a1.fun_2();
}
}
id 750564096but why sir
Class names, function names, variable names need to be descriptive. It's imposible to understand what you are trying to do