Q:

Java - Super Key concept

0

This Program is used to demonstrate Super Key concept.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

// super keyword demonstration 

class one 
{ 
String x = "Velan"; 
} 

class two extends one 
{ 
String x = "Senthil"; 

void display() 
{ 
System.out.println("\n"+x); 
System.out.println("\n"+super.x); 
} 
} 

class ssvSuper 
{ 
public static void main(String arg[]) 
{ 
two t = new two(); 
t.display(); 
} 
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now