Click to See Complete Forum and Search --> : how to convert long to an integer


davidchew
May 6th, 2000, 06:19 AM
I tried the the following command
but it does not seem to work.
Can any one help to convert a long to an integer

integervalue = Long.intValue(longvalue);

May 8th, 2000, 08:32 AM
what about just casting long to int?

long l=1234;
int i;
i = (int)l;