File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes It seems strange in file... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "It seems strange in file..." Watch "It seems strange in file..." New topic

It seems strange in file...

Bhavesh Sangwan
Ranch Hand

Joined: Aug 08, 2012
Posts: 57
O Hi...

look on this code in my file..

Is not it strange...
What is the meaning of {0} here .. what if I write {1} instead...

please explain

Jelle Klap

Joined: Mar 10, 2008
Posts: 1951

That is, most likely, a parameter that is replaced dynamically. It's pretty common to define resources like this in a .properties file, retrieve them using a PropertyResourceBundle and then us the MessageFormat (<-click) class to replace the parameters with desired String fragments.

Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
I agree. Here's the link:
subject: It seems strange in file...
It's not a secret anymore!