posted 21 years ago
I'm not really sure whether you're talking about objects (Double and Integer) or primitive datatypes (double and int). But here's a short program which illustrates both.
The important things here are - to cast to an int, you need to put (int) before the double you want to cast to an int. And to get the int value of a Double object, you can use the intValue() method of the Double object.
Hope this helps,
Kathy