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);
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!