Here are some examples of usage:
Object[] arguments = {
new Integer(7),
new Date(System.currentTimeMillis()),
"a disturbance in the Force"
};
String result = MessageFormat.format(
"At {1,time} on {1,date}, there was {2} on planet {0,number,integer}.",
arguments);
output: At 12:30 PM on Jul 3, 2053, there was a disturbance
in the Force on planet 7.
test driving of java applications
Dienstag, 14. April 2009
Ein Witz in der Java API Doc
May the force be with you :-)
-->
http://java.sun.com/j2se/1.4.2/docs/api/java/text/MessageFormat.html
Abonnieren
Kommentare zum Post (Atom)
Keine Kommentare:
Kommentar veröffentlichen