题目要求:
1.使用this调用已有的有参构造函数,width与length分别为5和6。
2.为Rectangle类覆盖toString。按照width=实际宽度值,length=实际长度值的格式输出
public Rectangle()
{
this.width=5;
this.length=6;
}
public Rectangle(int width, int length)
{
this.width = width;
this.length = length;
}
public String toString()
{
return "width="+width+"length="+length;
}