ragi singh wrote:hi
i have an integer and i cant understand why i can assign its value to a float without casting ?
Top of my head:
int takes up less space in memory than float. I believe that Head First
Java explained this beautifully when they mentioned cup size. int is a smaller cup than float, hence you can pour the contents of a small cup into a big cup without fear of it spilling over.