I have a double (23.46)
And using the methods Math.ceil and Math.floor and parsing my double to these methods, I get the same value returned to me, which is 23...
How do you do the actual invocation? I cannot replicate your result, using either the double object or the primitive type.
This code:
Double d_object = new Double(23.46);
double d_simple = 23.46;
System.out.println("Ceiling simple: " + Math.ceil(d_simple));
System.out.println("Floor simple: " + Math.floor(d_simple));
System.out.println("Ceiling object: " + Math.ceil(d_object));
System.out.println("Floor object: " + Math.floor(d_object));
gives me:
Ceiling simple: 24.0
Floor simple: 23.0
Ceiling object: 24.0
Floor object: 23.0