Sum of squares of binomial coefficients | Java Program to find the sum of square of binomial coefficient . ; function to return product of number from start to end . ; Return the sum of square of binomial coefficient ; Driven Program
class GFG { static int factorial ( int start , int end ) { int res = 1 ; for ( int i = start ; i <= end ; i ++ ) res *= i ; return res ; } static int sumofsquare ( int n ) { return factorial ( n + 1 , 2 * n ) / factorial ( 1 , n ) ; } public static void main ( String [ ] args ) { int n = 4 ; System . out . println ( sumofsquare ( n ) ) ; } }