Named placeholders in string formatting

In Python, when formatting string, I can fill placeholders by name rather than by position, like that:

print "There's an incorrect value '%(value)s' in column # %(column)d" % \
  { 'value': x, 'column': y }

I wonder if that is possible in Java (hopefully, without external libraries)?

21 Answers
21

Leave a Comment