Java Cookbook
percent
Problem:
You want to format and parse percent values.
Solution:
The Java NumberFormat class makes it easy to create a localized format for a percent value. Simply pass the locale when retrieving your instance. The format will see 1 as 100% and .1 as 10%.
To format and parse a percent value for Brazillian Portuguese:
If you are testing any of these recipes in Eclipse and the characters are not displaying correctly in your console visit http://i18ncookbook.com/eclipse_settings.
This site is ad supported. I hope you find something among our sponsors worth clicking. ;)
i18n search
Custom Search