Area of a square from diagonal length | Java Program to find the area of square when its diagonal is given . ; Returns area of square from given diagonal ; Driver code
class GFG { static double findArea ( double d ) { return ( d * d ) / 2 ; } public static void main ( String [ ] args ) { double d = 10 ; System . out . println ( findArea ( d ) ) ; } }