我试图了解类中java中的以下构造函数有什么区别
Box
{
Box(Box ob)
{
width = ob.width;
height = ob.height;
depth = ob.depth;
}
Box(double w, double h, double d)
{
width = w;
height = h;
depth = d;
}
Box()
{
width = 0;
height = 0;
depth = 0;
}
Box(double width, double height, double depth)
{
this.width = width;
this.height = height;
this.depth = depth;
}
}
大家干杯