public class MyClass {
public static int power_recursion(int base, int powerof) {
if (powerof != 0) {
return base * power_recursion(base, powerof - 1);
}
else {
return 1;
}
}
public static void main(String args[]) {
int base = 2, powerof = 4;
int result = power_recursion(base, powerof);
System.out.println(result);
}
}
/*
run:
16
*/