I want to calculate the value 0.95. Here is my method:
public static final int VAR = 5;
private static double getDouble(){
double dis = (double)(VAR/100);
dis = (double)(1-dis);
return dis;
}
However, it output 1.0?? If I type the same code in main method I got 0.95. Where is my mistake?