At present I am doing this:
long x = Math.round((numberFormat(Collections.min(te开发者_如何学运维mpList)) * 1000) / 1000);
In the above statement tempList
is List
type. Suppose Collections.min(tempList)
returns the value 236.589; x
is assigned the value 237, but I want 236 only.
How do I do that?
Use the floor-method instead of round.
精彩评论