Hi
I was studying "Complete
Java 2 Certification Study Guide ", Chapter 4. It clearly states that Primitive data types can be
converted to a "larger data type" e.g from a byte to a short.
This is known as widening conversion. The system will do this for you, its Implicit.
It then later states that a "long" can be converted to a "float".
How is this possible ???
A long is 64 bit BUT a float is 32 bit. This is not a widening conversion, rather its a narrowing conversion and hence will give a compile-time error.
Can somone please shed light on this, maybe a couple of code examples ???
Thanks in Advance.