Perimeter Of Rectangle in Java

This program to find the perimeter of rectangle
Formula:
Perimeter of a rectangle is 2*(length *+width)
In this program we need to get the length and width from the user and we shall display after getting the inputs
Example:
Length=5
Width=5

Perimeter of Rectangle is 20
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
public class AreaOfRectangle{
 
        public static void main(String[] args) {
               
                int width = 0;
                int length = 0;
                       
                try
                {
                        //read the length from console
                        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                       
                        System.out.println("Please enter length of a rectangle");
                        length = Integer.parseInt(br.readLine());
 
                        //read the width from console
                        System.out.println("Please enter width of a rectangle");
                        width = Integer.parseInt(br.readLine());
                       
                       
                }
                //if invalid value was entered
                catch(NumberFormatException ne)
                {
                        System.out.println("Invalid value" + ne);
                        System.exit(0);
                }
                catch(IOException ioe)
                {
                        System.out.println("IO Error :" + ioe);
                        System.exit(0);
                }
               
                int area = 2*(length + width);
               
                System.out.println("Perimeter of a rectangle is " + area);
        }
               
}


Output:
Please enter length of a rectangle 6
Please enter width of a rectangle 6
Perimeter of a rectangle is 24