Hi, I have to display values in rounded form. For example if a=23.4566777 then i have to round it to 23.45 . Please help me achieve this requirement. Currently I am using Math.round() method, which gives output as 23 , i.e. it removes the decimal values completely.
Hi Jaikiran, Thanks a lot. It works perfectly. I have found one more way. I first convert the num to string object. Then get the index of "." in that string. Now i take substring of the original string.
Anyways your approach is a better one and I have used that one only in my code.