the corner office : tech blog

a tech blog, by Colin Pretorius

« Square pegs and round holes | Main | Avira fail »

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}

meta

-home-
about
main blog

archives

rssfeed posts

© Colin Pretorius