This week's book giveaway is in the Agile and Other Processes forum. We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line! See this thread for details.
Hi, According to widening conversion rule RHE says that we can convert long to float but not vice versa... I think widening does not refer to the size of the data type... as long occupies (64 bits) where as float occuies only 32 bits.. then, what this widening refers to ?
Hi srinivas D, When you go from a float to a long you lose precision since a long cannot represent the decimal value of a float. (see JLS § 5.1.2) You can force a float to a long using an explicit cast