This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara 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