I am trying to get the nearest percent of two numbers in java, but it is not working.

This is what I have so far:

```
DecimalFormat df = new DecimalFormat("0.0");
double PD1 = (minus1 / MaxInt) * 100;
P1 = String.valueOf(df.format(PD1));

```

MaxInt is number possible, minus1 is MaxInt - 1 and then I multiply it by 100 to get the percentage and then the decimal format is suppose to round it to one decimal place, but it keeps returning a zero.