GeometricObject 是一个抽象类,当我尝试运行测试代码(如下所示)时,我收到错误“无法实例化 GeometricObject 类型”任何想法如何解决它? import geometricobject.GeometricObject; public class TestGeometricObject { public static void main(String[] args) { GeometricObject obj1 = new GeometricObject(); GeometricObject obj2 = new GeometricObject("blue", true); System.out.println("Object 1: " + obj1.toString()); System.out.println("Object 2: " + obj2.toString()); }}
添加回答
举报
0/150
提交
取消