I am learning Java by debugging programs from various tutorials. At a moment I am fixing this calculator: http://www.dreamincode.net/forums/topic/321933-creating-a-calculator-using-jframe/
If you press "1/1" it displays "1.0" instead of "1". I am leaning towards
if (abs(result-round(result)) < 0.000000001){(int)(result)}
What would be an appropriate way to fix this glitch? Thank you in advance,