最适合网络开发者的网站
Java 编程语言。初学者课程

尿素

Java How To Get the Area of a Rectangle


Area of Rectangle

The area of a rectangle can be found by multiplying the length of the rectangle by the width:

例子

int length = 5;
int width = 2;
int area = length * width;
System.out.println("Area of rectangle: " + area);
亲自尝试 »