December 31st, 2002, 11:27 AM
How to convert double to Int
double cd1110 = Double.parseDouble(request.getParameter("cd1110"));
I want to convert the double for comparing:
Is this is correct ?
Any help greatly appreciated.
December 31st, 2002, 03:38 PM
The javadoc [http://java.sun.com/j2se/1.4/docs/api/] is your friend!
Double.intValue() converts a Double to an int. I don't think there's any way to go directly from a double to an int.
January 1st, 2003, 12:59 AM
You can go directly through type casting
int i = (int)cd11110