C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Java - Super Key Demo
WhatsApp
Senthilvelan Sambamoorthy
Aug 20
2016
726
0
0
ssvSuper.rar
// 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();
}
}
Java
Super key Demo
Up Next
Java - Super Key Demo