This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
In the above stmt only integer division will be carried out not float division.bcoz both 35 & 6 will be taken as integers & result will be 35 /6 = 5(digits after decimal point will be truncated).so no cast is needed here.
I hope that answer by priya helps you..! To add more..!
The resultant of the division is integer that is 5 which can be assigned to float. If the question was like 35.0/6.0 then u needed a explicit cast as the the default type of answer is 5.0 double in this case.
Thanks and Regards,<br />Nilesh<br />SCJP 1.4, SCWCD 1.4