01.
long
n =
461012
;
02.
System.out.format(
"%d%n"
, n);
03.
System.out.format(
"%08d%n"
, n);
04.
System.out.format(
"%+8d%n"
, n);
05.
System.out.format(
"%,8d%n"
, n);
06.
System.out.format(
"%+,8d%n%n"
, n);
07.
08.
double
pi = Math.PI;
09.
10.
System.out.format(
"%f%n"
, pi);
11.
System.out.format(
"%.3f%n"
, pi);
12.
System.out.format(
"%10.3f%n"
, pi);
13.
System.out.format(
"%-10.3f%n"
, pi);
14.
System.out.format(Locale.FRANCE,
15.
"%-10.4f%n%n"
, pi);
16.
17.
Calendar c = Calendar.getInstance();
18.
System.out.format(
"%tB %te, %tY%n"
, c, c, c);
19.
20.
System.out.format(
"%tl:%tM %tp%n"
, c, c, c);
21.
22.
System.out.format(
"%tD%n"
, c);