标签: java junit
我不断收到错误消息(java:找不到符号Symbol:方法getType())
公共类Shape {
答案 0 :(得分:1)
getCircleRadius和getType方法在Shape类上,但是您的代码引用是Shape.ShapeType.getCircleRadius
getCircleRadius
getType
Shape
Shape.ShapeType.getCircleRadius
您需要在getCircleRadius实例上引用Shape,该实例可能是由new Shape(ShapeType,double)创建的
new Shape(ShapeType,double)