Area of hexagon with given diagonal length | Java program to find the area of Hexagon with given diagonal ; Function to calculate area ; Formula to find area ; Main
import java . lang . Math ; public class GfG { public static float hexagonArea ( float d ) { return ( float ) ( ( 3 * Math . sqrt ( 3 ) * d * d ) / 8 ) ; } public static void main ( String [ ] args ) { float d = 10 ; System . out . println ( " Area ▁ of ▁ hexagon : ▁ " + hexagonArea ( d ) ) ; } }