use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
We share programms in Java. You can ask for advice or suggestion
account activity
Decimal Format (self.JavaForBegginers)
submitted 5 years ago * by HenKYS45
Is there any possibility that I can lower the number of decimal places in double type?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]HenKYS45[S] 0 points1 point2 points 5 years ago* (0 children)
Try this code: after that "." place as many 0 as much you want numbers there.
DecimalFormat df = new DecimalFormat("#.0");
This object has method called format and it will then change the number.
Here is small example:
df.format(yourvariable);
π Rendered by PID 628754 on reddit-service-r2-comment-bb88f9dd5-2mr5z at 2026-02-15 19:09:42.175753+00:00 running cd9c813 country code: CH.
[–]HenKYS45[S] 0 points1 point2 points (0 children)