I saved some posts in the resource set. I am trying to format these messages as follows.
import java.text.MessageFormat; String text = MessageFormat.format("You're about to delete {0} rows.", 5); System.out.println(text);
Assume that the first parameter ie the actual message is stored in a properties file that is somehow received.
The second parameter ie 5 is a dynamic value and should be placed in placeholder {0} , which does not occur. The next line prints,
You are about to delete lines {0}.
The placeholder is not replaced by the actual parameter.
This is the apostrophe here - You're . I tried to run away from him, as usual, like You\\'re , although this did not work. What changes are needed to make it work?
java resourcebundle
Tiny Jul 10 '13 at 11:34 on 2013-07-10 11:34
source share