TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Java - Super Key Demo
Senthilvelan Sambamoorthy
Aug 20
2016
Code
670
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
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