@@ -0,0 +1,1303 @@
+/**%0A * @file TestFormat.java%0A * @author Valery Samovich%0A * @version 1%0A * @date 2015/02/06%0A */%0A%0Apackage com.samovich.basics.fundamentals.numbers;%0A%0Aimport java.util.Calendar;%0A%0Apublic class TestFormat %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        // %22n%22 A new line character appropriate to the platform running%0A        // the application. You should always use %25n, rather than %5Cn.%0A%0A        System.out.println(%22Integers:%22);%0A        long n = 461012;%0A        // A decimal integer with new line%0A        System.out.format(%22%25d%25n%22, n);%0A        // Eight characters in width, with leading zeroes as necessary.%0A        System.out.format(%22%2508d%25n%22, n);%0A        System.out.println(%22%22);%0A%0A        System.out.println(%22Floats:%22);%0A        System.out.println(%22Numbers:%22);%0A        double pi = Math.PI;%0A        // A float%0A        System.out.format(%22%25f%25n%22, pi);%0A        // Three places after decimal point.%0A        System.out.format(%22%25.3f%25n%22, pi);%0A        System.out.println(%22%22);%0A%0A        System.out.println(%22Date & Time Conversation:%22);%0A        Calendar c = Calendar.getInstance();%0A        // http://docs.oracle.com/javase/tutorial/java/data/numberformat.html%0A        System.out.format(%22%25tB %25te, %25tY%25n%22, c, c, c);%0A        System.out.format(%22%25tl:%25tM %25tp%25n%22, c, c, c);%0A        System.out.format(%22%25tD%25n%22, c);%0A%0A    %7D%0A%0A%7D%0A

Add Formatting Numeric Print Output example