Java program to calculate rectangle area and circumference. We can calculate the perimeter of a rectangle using the formula. Calculation with no user interaction class AreaOfRectangle2 public static void main String args double length 45.
Perimeter is the distance around the edges.
Find area perimeter of rectangle in java with example Given a length and breadth of a rectangle find the area and perimeter of rectangle. Area of Rectangle Length Breadth. Program gets rectangle length and width from user and calculates area and circumference and prints them using following formulas Area length X width Circumference 2 X length 2 X width. Below is the implementation of the above approach.