Find Area of Rectangle in Java

Find Area of Rectangle in Java

Here you will learn that, How to find Area of Rectangle in Java programming.

A rectangle is a four-sided shape with right angles. Its opposite sides have equal length, and diagonals bisect at right angles.

Formula:

Area = Length * Width

Example:

Length = 10

Width = 8

Area of Rectangle is 80

Find Area of Rectangle in Java

Output

C:\CodeRevise\java>javac RectangleArea.java

C:\CodeRevise\java>java RectangleArea
Enter the length : 10
Enter the width : 7
The area of the rectangle is: 70.0

 

 

Check out our other Java Programming Examples

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top