java - value of variable {5} is not set -


this in properties file:

message=you scheduled {0} @ {1} {2} {3} @ {4}. we'll see then! questions please call {5}. 

java code setting values:

string[] msgparams = new string[6]; msgparams[0] = "tire rotation" msgparams[1] = "2016-06-03" msgparams[2] = "12:00" msgparams[3] = "vehicle" msgparams[4] = "dehli" msgparams[5] = "9876543210"  string message = messagesource.getmessage("message", msgparams , locale.getdefault());  system.out.println(message); 

output is:

you scheduled tire rotation @ 2016-06-03 12:00 vehicle @ dehli. see then! questions please call {5}.

value of {5} not set.

it maybe because missing \before ' :

message=you scheduled {0} @ {1} {2} {3} @ {4}. we\'ll see then! questions please call {5}.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo