Area of parallelogram in java

Let’s learn area of parallelogram in java.

Area of parallelogram in java

A parallelogram is four sided geometrical shape with opposite sides parallel and opposite angles equal. To calculate area of parallelogram formula is:

area = base x height

Let’s see program to find area of parallelogram in java.

import java.util.Scanner;
public class AreaOfParallelogram
   public static void main(String[] args)
      Scanner sc = new Scanner(;
      System.out.println("Please enter base of parallelogram: ");
      double base = sc.nextDouble();
      System.out.println("Please enter height of parallelogram: ");
      double height = sc.nextDouble();
      double area = base * height;
      System.out.println("Area of parallelogram is: " + area);


Please enter base of parallelogram:
Please enter height of parallelogram:
Area of parallelogram is: 70.0

Also read – inheritance in java