wood burning stoves 2.0*
The moose likes Struts and the fly likes It seems strange in MessageResourse.properties file... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "It seems strange in MessageResourse.properties file..." Watch "It seems strange in MessageResourse.properties file..." New topic
Author

It seems strange in MessageResourse.properties file...

Bhavesh Sangwan
Ranch Hand

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

look on this code in my messageResourse.properties file..

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

please explain

Thanks
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1753
    
    7

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: It seems strange in MessageResourse.properties file...
 
Similar Threads
Strange characters on writing a file
Regarding TLD
Get file created time
Decimal Format
NX: Update Record - padding problem