How to use java.String.format?

The following snippet shows you how to use java.String.format.

Sample Java

String formattedString = String.format("Player1: %s; Player2: %s?","john","james");

for more information take a look at the docs String.Format

Please Share us:
Please rate this snippet

One thought on “How to use java.String.format?

Leave a Reply