I'm using this:
where punctaj and nr_intrebari are intCode:NumberFormat formatter = new DecimalFormat("##.##"); double nota=(punctaj / nr_intrebari)*10; String notafinala=formatter.format(nota);
Why nota or notafinala is 0 (zero) is the result of the division is not an integer?
For example, if punctaj=1 and nr_intrebari=3 then nota=0.0.Why? I want the result to be a double like 0,33.


Reply With Quote


Bookmarks