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 java program.

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 – area of rhombus in java

Also read – area of equilateral triangle in java