public class Parent
{
public static class First
{
public int x;
public int y;
public First(int x, int y)
{
this.x = x;
this.y = y;
}
@Override
public String toString()
{
return String.format("%3d, %3d", this.x, this.y);
}
}
public static class Second extends First
{
public int z;
public Second(int x, int y, int z)
{
super(x, y);
this.z = z;
}
@Override
public String toString()
{
return String.format("%s, %3d", super.toString(), this.z);
}
}
}