20、下面代码的运行结果为:() public class Rectangle {public int width = 3;public int height = 4;public int area() {return width * height; }public static void main(String args[]) { Rectangle rectangle = new Rectangle(); rectangle.height = 5; System.out.println(rectangle.area()); }}

A.15 B.有编译错误,程序不能运行 C.12 D.0

时间:2024-05-30 14:36:08

相似题目