From what i know,when you extend a class,
you should call the superclass constructor from the subclass constructor.So your subclass code should be like-
class Box1 extends Box
{
int k;
Box1(int width,int height,int breadth)
{
i=width;
j=height;
k=breadth;
super(i,j);
}
Let's see what others have to say!!!