The doc for Math.floor states that the returned value is equal to a "mathematical integer".So it's an integer.
What is the value of d: 4.0 or 4?What's the difference?
If they are differentDid somebody say they were different?
why (4.0 != 4) does not evaluate to true?Because they aren't different.
public static double floor(double a)Which means it does return double(java sense) but since value-wise the decimal part is always 0 for returned value, it is mathematical integer(mathematical sense).
991964 wrote:No, most people here don't work for Oracle (when they do, it is specifically indicated using an icon). The medals are awarded for providing correct answers, or at least answers that people perceive as helpful and/or correct. Gotta collect them all!
Since I want to build a case for note revision as strong as possible, I would
like to ask you about your background: are you working for Oracle? Those
medals on the left of the screen (guru, etc ...): are they awarded be Oracle?
The System class - http://docs.oracle.com/javase/6/docs/api/java/lang/System.html
System.out.print prints it 4.0