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.
1 and 3 are int literals, and int division always truncates. The int result is then widened to type long when it's assigned to the variable "test."
For a floating-point result, at least one of the literals needs to be a float or double. Then the result needs to be assigned to a variable of type float or double. [ June 01, 2006: Message edited by: marc weber ]
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org