补全toString方法,使其内容为“width=***,height=***”。public class Rectangle{ private double width; private double height; public Rectangle(){} public Rectangle(double a, double b) { width=a;height=b; } public String toString(){ 代码} }
发布时间:2024-04-08 15:51:53