the corner office : tech blog

a tech blog, by Colin Pretorius

Fiddly bugs

Bah. Predict the range of pctOver:

double pctOver = cnt / rkList.size();

You can't do it until you know what type cnt is, and the answer is very different if cnt is an int.

Now predict the range of pctOver:

double pctOver = (double) cnt / rkList.size();

*sigh*

{2010.11.02 17:25}

« Square pegs and round holes

» Avira fail