I could not answer this q, can someone plz explain
Jayashree, pls. use CODE tag.
thanks & regards,<br />Sanjeev.
Joined: Aug 21, 2004
A. is ans. Long is 64 bit. float is 32 bit and value would be truncated & (changed automatically) so that would result unequal. rest of data type used are "less or equal" to 32 bit, value would be same for float(32 bits) & double (64 bits).
Something weird: I executed and printed the numbers in the method (see below) and for the Long numbers, it resulted in "equal" (though I see they are different). The Integers results in unequal (I read that "widening conversion of an int or long to a float may result in loss of precision however the new float value will be the correctly rounded" (http://www.janeg.ca/scjp/oper/conversions.html) so this should be allright).