Sum of all the numbers in the Nth parenthesis | Java implementation of the approach ; Function to return the sum of the numbers in the nth parenthesis ; Driver code
class GFG { static int findSum ( int n ) { return ( int ) Math . pow ( n , 3 ) ; } public static void main ( String [ ] args ) { int n = 3 ; System . out . println ( findSum ( n ) ) ; } }