Jasbir21
asked on
RoundingMode.FLOOR - Maps..
Hi , my question is that currently it uses :
RoundingMode.FLOOR, Let's say I dont want floor or ceil, i want it to decide whether to floor or ceil..how to change the roundingmode..
thanks
for(int i=0;i<years+1;i++)
{
map=new TreeMap<BigDecimal,Integer
maps.add(map);
for(int j=0;j<iterations;j++)
{
Integer val=map.get(BigDecimal.val
You can change to whatever mode you want. What do you want to do?
ASKER
actually, currently, it is flooring..
i dont want flooring..
lets say value is 3.3... , it should round to 3.0
but if value is 3.5, it should round to 4.0
something like this
i dont want flooring..
lets say value is 3.3... , it should round to 3.0
but if value is 3.5, it should round to 4.0
something like this
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>lets say value is 3.3... , it should round to 3.0
Of course the first arg to setScale would be zero for that
Of course the first arg to setScale would be zero for that
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks a lot :-)
:-)