package p36_lokalizacja.formatowanie;

import java.io.File;
import java.util.Locale;

public class Printf {

	public static void main(String[] args) {
		
		System.out.println(Locale.getDefault());
		int x = 7, y = 13;
		double f = 112233.456;
		String s = "Ala ma kota";
		Object o = new File("plik.txt");
		
		System.out.printf("Dwa inty: %d %d, float: %f %f, stringi: %s %s%n",
				x, y, f, Math.PI, s, o);

		System.out.printf(new Locale("en", "US"), "Dwa inty: %d %d, float: %f %f, stringi: %s %s%n",
				x, y, f, Math.PI, s, o);

		System.out.printf("Dwa inty: %03d %-5d, float: %+,1.3f %1.20f, stringi: %s %s%n",
				x, y, f, Math.PI, s, o);
		
		System.out.printf("%1$f %1$20.10f%n", Math.PI);

	}

}
