Rounding Logic for decimal digits in java -


this question has answer here:

i need rounding logic in following pattern..for 2.23 should 2.2 ,for 2.26 should 2.3... please out

double = <ur number>; double roundoff = (double) math.round(a*10)/10; 

hope you. here 2.25 round off 2.3


Popular posts from this blog

javascript - Js, document.getElementById("ID").innerHTML, error -

objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -

jquery - jqGrid update specific column data with out refreshing the entire column? -