A DESCRIPTION OF THE PROBLEM :
Right before "Details" part of format string explanation, the original text writes:
Another way to reference arguments by position is to use the '<' ('\u003c') flag, which causes the argument for the previous format specifier to be re-used. For example, the following two statements would produce identical strings:
Calendar c = ...;
String s1 = String.format("Duke's Birthday: %1$tm %1$te,%1$tY", c);
String s2 = String.format("Duke's Birthday: %1$tm %<$te,%<$tY", c);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The last line uses
"%<$..."
for last argument reuse, which should be
"%<..."
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html
###@###.### 2004-12-22 18:43:48 GMT
Right before "Details" part of format string explanation, the original text writes:
Another way to reference arguments by position is to use the '<' ('\u003c') flag, which causes the argument for the previous format specifier to be re-used. For example, the following two statements would produce identical strings:
Calendar c = ...;
String s1 = String.format("Duke's Birthday: %1$tm %1$te,%1$tY", c);
String s2 = String.format("Duke's Birthday: %1$tm %<$te,%<$tY", c);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The last line uses
"%<$..."
for last argument reuse, which should be
"%<..."
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html
###@###.### 2004-12-22 18:43:48 GMT