Simple math (?)

I have int a=90.
I have Long result =0;

I do result = a*1000, I get 24464

Why does it auto cast the long, into an int?
(if both long, than the ans is fine - 90000)
(if I try to cast long(result*1000), still int.)

I feel very stupid,
and that this should be very basic.

What am I missing?
Thnx.

Why does it auto cast the long, into an int?

Because you are doing the calculation with ints

Force the calculation to be done with longs instead

  result = a * 1000UL;

have a read of integer conversions