/** * Stdout : * * <pre> * Hello world! * Hello Mr Smith * Hello Mr Smith, your last connection was the 2010-10-21 * Hello Mr Smith, your last connection was the 2010-10-21 and you have win 1234.56 * </pre> * * @throws ParseException */ public void echo() throws ParseException { DateFormat df = new SimpleDateFormat("yyyy/MM/dd"); System.out.printf("%s\n", myBundle.getMessage("label.hello")); System.out.printf("%s\n", myBundle.getMessage("label.hello.who", "Smith")); System.out.printf( "%s\n", myBundle.getMessage("label.hello.when", "Smith", df.parse("2010/10/21"))); System.out.printf( "%s\n", myBundle.getMessage("label.hello.how", "Smith", df.parse("2010/10/21"), 1234.56)); }
/* (non-javadoc) * @see java.lang.Throwable#getMessage() */ public String getMessage() { return I18nMessages.getMessage(messageKey, messageArgs); }