0
import java.awt.Rectangle;
public class IONS {
public static void main(String[] args) {
Rectangle x = new Rectangle(10, 20);
int width = x.width();
System.out.println(width);
}
}
编译时第7行有错误,我在哪里出错?方法宽度()未定义为类型矩形
ERROR: The method width() is undefined for the type Rectangle IONS.java