escaping - Can I escape braces in a java MessageFormat? -
I want to output some braces in Java message format. For example, I know that the following does not work:
MessageFormat.format ("public {0} get {1} () {return} {}}} \ n \ n" , Type, uppercammail, lower camel);
Is "Return {2}" a way to avoid surrounding braces?
You can put them in single quotation marks e.g.
'{' return {2}; '}'
See for more information.
Comments
Post a Comment