Maximum area of quadrilateral | Java program to find maximum are of a quadrilateral ; Calculating the semi - perimeter of the given quadrilateral ; Applying Brahmagupta 's formula to  get maximum area of quadrilateral ; Driver code
import java . io . * ; class GFG { static double maxArea ( double a , double b , double c , double d ) { double semiperimeter = ( a + b + c + d ) / 2 ; return Math . sqrt ( ( semiperimeter - a ) * ( semiperimeter - b ) * ( semiperimeter - c ) * ( semiperimeter - d ) ) ; } public static void main ( String [ ] args ) { double a = 1 , b = 2 , c = 1 , d = 2 ; System . out . println ( maxArea ( a , b , c , d ) ) ; } }