Check out example codes for "area of rhombus in java". It will help you in understanding the concepts better.

Code Example 1

import java.util.Scanner;
public class AreaOfRhombus
{
   public static void main(String[] args)
   {
      Scanner sc = new Scanner(System.in);
      System.out.println("Please enter length of diagonal 1: ");
      double diagonal1 = sc.nextDouble();
      System.out.println("Please enter length of diagonal 2: ");
      double diagonal2 = sc.nextDouble();
      double area = (diagonal1 * diagonal2) / 2;
      System.out.println("Area of Rhombus is: " + area);
      sc.close();
   }
}

Learn ReactJs, React Native from akashmittal.com