December 31st, 2002, 12:27 PM
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, 04: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, 01:59 AM
You can go directly through type casting
int i = (int)cd11110