java.text Code Samples
- How do I convert String to Date object?
- How do I format a number?
- How do I convert Date to String?
- How do I format a date into dd/mm/yyyy?
- How do I format a date-time value?
- How do I format a number with leading zeros?
- How do I format date using a locale based format?
- How do I Get a List of Month Names?
- How do I Get a List of Weekday Names?
- How do I sort strings using Collator class?
- How do I format a number for a locale?
- How do I iterate each characters of a string?
- How do I parse a number for a locale?
- How do I reverse a string using CharacterIterator?
Page of 2 |
Prev
|
Next
How do I format a message that contains number information?
This example show you how to use java.text.MessageFormat class to format a message that contains numbers.
The result of the program are the following lines:
This is a 10 and 75 numbers This is a 10 and 75 numbers This is a formatted 25.76 and 75.25 numbers This is a formatted currency $10.00 and $75.00 numbers This is a formatted percentage 10% and 75% numbers
