How can a message which embeds dynamic information be generalized?

Joe Sam Shirah

You will need to use a ResourceBundle in cooperation with a MessageFormat. The API documentation includes a description of how it works. There is also a reasonable demo and explanation of how to use these classes together in The Java Tutorial at Dealing with Compound Messages.

In your case, you would use a one element Object array with the format pattern, changing the element to the appropriate order number as needed.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact