example code super keyword in constructor
class P
{
P(int i)
{
System.out.println(i);
}
}
class C extends P
{
C()
{
super(10); // valid (without super invalid)
// super used to call super class constructors here
}
}
Sun certification level tutorial and examples Organized by topic.
class P
{
P(int i)
{
System.out.println(i);
}
}
class C extends P
{
C()
{
super(10); // valid (without super invalid)
// super used to call super class constructors here
}
}
Thank you for visiting Java Examples.For regular updates request you to subscribe to my RSS Feed or register your Email Subscription for updates directly into your mail box.
0 comments:
Post a Comment