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

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -