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
Win a copy of
REST with Spring (video course)
this week in the
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:
I agree. Here's the link:
subject: Long to Float conversion
RHE - Conversion of primitives
float to int
Conversion from long to float
Long to Float
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015