Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

How to display the amount of digits in a number?

$
0
0
Ok, say I have

y = 101.333; 


How can I display how many digits there are before (3 in this case) and after the decimal point (3 in this case)?

Can we possibly use the DecimalFormat class to do this?

If so, how please?

Thank you.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>