class Power1 { public static long pow(long x, long y) { // return x to the power of y if ( y == 0 ) { return 1; } else { return x * pow(x,y-1); } } public static void main(String[] args) { System.out.println( pow(1,1000000L) ); } }