Find the area of quadrilateral when diagonal and the perpendiculars to it from opposite vertices are given | Java program to find the area of quadrilateral ; Function to find the area of quadrilateral ; Driver code
class GFG { static float Area ( int d , int h1 , int h2 ) { float area ; area = ( float ) 0.5 * d * ( h1 + h2 ) ; return area ; } public static void main ( String [ ] args ) { int d = 6 , h1 = 4 , h2 = 3 ; System . out . println ( " Area ▁ of ▁ Quadrilateral ▁ = ▁ " + Area ( d , h1 , h2 ) ) ; } }