super_method
class base
{
int a=100;
void show()
{
System.out.println("The value of a="+a);
}
}
public class super_method extends base
{
int a=200;
void show()
{
super.show();
System.out.println("The value of a="+a);
}
public static void main(String args[])
{
super_method d=new super_method();;
d.show();
}}
{
int a=100;
void show()
{
System.out.println("The value of a="+a);
}
}
public class super_method extends base
{
int a=200;
void show()
{
super.show();
System.out.println("The value of a="+a);
}
public static void main(String args[])
{
super_method d=new super_method();;
d.show();
}}
Comments
Post a Comment