Write a java program to print the length and perimeter of a rectangle

Write a java program to print the length and perimeter of a rectangle. In a Java program, measure the length and breadth.The region and perimeter will be printed in the java program’s output. The length and width of the input will be printed as a field and perimeter in the output. The term “length” refers to how long something is, or how much vertical space or time it occupies. A closed geometrical figure’s boundary is defined as a continuous line.

import java.util.Scanner;
public class Main
public static void main(String args[])
int length, breadth, peri, area;
Scanner scan = new Scanner(System.in);
System.out.print("Enter length and breadth of Rectangle ");
length = scan.nextInt();
breadth = scan.nextInt();
area = length*breadth;
peri = (2*length) + (2*breadth);
System.out.print("Area = " +area);
System.out.print("\nPerimeter = " +peri);

Enter length and breadth of Rectangle 34                                                                                        
Area = 1904                                                                                                                     
Perimeter = 180