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 *


You have successfully subscribed to myprogrammingschool

There was an error while trying to send your request. Please try again.

My Programming School will use the information you provide on this form to be in touch with you and to provide updates and marketing.