Java Area of Rectangle

  Program to calculate the area of ​​the rectangle

The area of ​​a rectangle is the amount of space occupied by the rectangle. A rectangle can be defined as a plane shape that has two adjacent sides of length. The 4 angles present in the rectangle are also equal. A rectangle can be divided into 4 equal squares. Each internal angle in a rectangle measures 90 degrees.
The area of ​​a rectangle is the number of square units to fill a rectangle completely.


Source code:

import java.util.*;
class Area
public static void main(String []args)
Scanner ob=new Scanner(;
int l,h;
System.out.println(“enter value l and h”);
int Rec=l*h;
System.out.println(“Area of rectangle:”+Rec);

Have any Question or Comment?

Leave a Reply

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