A simple
test confirms that the expression returns a long. For example, when attempting to compile this code...
...the result is...
But speaking of "loss of precision,"
Java is case sensitive, so "math" is not the same as "Math." Are you certain this is what the roundup question is asking? Or is there more context to the question?
For example, is
this the one...?
(#147) What is the result of the following code
System.out.println( Math.round(-3.22) );
-3.0
-4
-3
-4.0
[ September 04, 2007: Message edited by: marc weber ]