File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Programmer Certification (SCJP/OCPJP)
Long to Float conversion
Joined: May 07, 2002
May 07, 2002 20:12:00
Hi All ,
I have a very basic doubt as to how can a conversion from long to float not require any explicit casting or why is it known as widening conversion?
Long is 64 bits and float is 32 bits so doesn't the number get truncated when a cast occurs?
Joined: Jan 07, 2002
May 07, 2002 21:12:00
Here are a couple of previous threads that discuss this issue:
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: Long to Float conversion
Long to Float
RHE - Conversion of primitives
Conversion from long to float
float to int
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014