Hypercube Graph | Java program to find vertices in a hypercube graph of order n ; Function to find power of 2 ; Driver program
class GfG { static int power ( int n ) { if ( n == 1 ) return 2 ; return 2 * power ( n - 1 ) ; } public static void main ( String [ ] args ) { int n = 4 ; System . out . println ( power ( n ) ) ; } }