I am having calculation in my java coding, my problem now is whenever i hit 0 divide by 0, it prints the value ?
.
My question is, can i change the ?
to print 0
or something else? Is that possible?
Below is my code,
DecimalFormat df = new DecimalFormat ("0.00");
if (rowset[9] == null) {rowset[9]="0";out.print("0.00");}
else out.print(df.format(Double.valueOf(rowset[9])/Double.valueOf(rowset[10])));