Tuesday, February 24, 2009

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
}
}


0 comments:

Post a Comment