Sum of square of first n odd numbers | Efficient Java method to find sum of square of first n odd numbers . ; driver code
import java . io . * ; class GFG { static int squareSum ( int n ) { return n * ( 4 * n * n - 1 ) / 3 ; } public static void main ( String args [ ] ) { System . out . println ( squareSum ( 8 ) ) ; } }