I am unable to understand the solution of this Question?? Please Explain
What is the output { Float f1 = new Float("4.4e99f"); Float f2 = new Float("-4.4e99f"); Double d1 = new Double("4.4e99"); System.out.println(f1); System.out.println(f2); System.out.println(d1); }
a) Runtime error b) Infinity -Infinity 4.4E99 c) Infinity -Infinity Infinity d) 4.4E99 -4.4E99 4.4E99
floats have a range of something like 1e-45 to 1e38 (positive or negative). So 4.4e99 and -4.4e99 are out of that range, so the value becomes infinity. [ February 08, 2006: Message edited by: Craig Tyler ]