public class ComputeInterest {
static double previousBalance = 100.0;
public static void main(String args[]) {
System.out.println(getBalance(5));
}
static double getBalance(int y) {
if (y == 1) {
return previousBalance * 1.05;
} else {
return getBalance(y - 1) * 1.05;
}
}
}
static double previousBalance = 100.0;
public static void main(String args[]) {
System.out.println(getBalance(5));
}
static double getBalance(int y) {
if (y == 1) {
return previousBalance * 1.05;
} else {
return getBalance(y - 1) * 1.05;
}
}
}

I'm here, as always...