What don't you understand? This specific overload or the whole concept of formatting strings? Formatting strings is a process of combining a
string (called a 'format string') containing some special characters ('format specifiers') with a list of arguments, which gives a formatted string as output. The whole specification for formatting in
Java is pretty long and somewhat complicated. You will probably find all details you need in the JavaDoc of the
java.util.Formatter class.
As to the String#format using Locale, it just formats all locale-specific arguments provided to the method (date, time, numbers etc.) according to the given Locale.
A (very
simple example of format:
The code above will output:
The value of 'i' is: 6 (printf works same as String#format)
In this example:
"The value of 'i' is: %d" is a format string
%d is a fomat specifier for decimal integer
i is argument, whose value is substituted for %d
[ August 13, 2008: Message edited by: Dariusz Kordonski ]