
本站地址:http://www.bajiao123.com

JDK5.0的11个主要新特征-Java技术
H
Two-digit hour (with leading zeroes), between 00 and 23
18
k
Two-digit hour (without leading zeroes), between 0 and 23
18
I
Two-digit hour (with leading zeroes), between 01 and 12
06
l
Two-digit hour (without leading zeroes), between 1 and 12
6
M
Two-digit minutes (with leading zeroes)
05
S
Two-digit seconds (with leading zeroes)
19
L
Three-digit milliseconds (with leading zeroes)
047
N
Nine-digit nanoseconds (with leading zeroes)
047000000
P
Uppercase morning or afternoon marker
PM
p
Lowercase morning or afternoon marker
pm
z
RFC 822 numeric offset from GMT
-0800
Z
Time zone
PST
s
Seconds since 1970-01-01 00:00:00 GMT
1078884319
E
Milliseconds since 1970-01-01 00:00:00 GMT
1078884319047
Table 3-6. Flags for printf
Flag
Purpose
Example
+
Prints sign for positive and negative numbers
+3333.33
space
Adds a space before positive numbers
| 3333.33|
0
Adds leading zeroes
上一页 [1] [2] [3] [4] [5] [6] [7] [8] 下一页
本站地址:http://www.bajiao123.com

