java - How do I divide so I get a decimal value? - Stack Overflow
https://stackoverflow.com/questions/665018/how-do-i-divide-so-i-get-a-decimal-value
WEBMar 20, 2009 · In your example, Java is performing integer arithmetic, rounding off the result of the division. Based on your question, you would like to perform floating-point arithmetic. To do so, at least one of your terms must be specified as (or converted to) floating-point: Specifying floating point: 3.0/2. 3.0/2.0.
DA: 35 PA: 42 MOZ Rank: 86