My program on compound interest gets compiled fine but it won't display anything .
Yesterday When I created a new class and tried to run a simple for loop , the same thing happened . But when I tried to run the same for loop in a previously made class , it ran just fine .
Source code :
class mangoes{
public static void main(String[] args){
double amount;
double principal = 1000;
double rate = .01;
for(int day=1;day<=20;day++){
amount=principal*Math.pow(1 + rate , day);
System.out.println(day + " "+ amount);
}
}
}
So is there some kind of problem with my eclipse ?