import java.util.Formatter; import java.util.Locale; public class MainClass{ public static void main(String[] argv){ StringBuilder sb = new StringBuilder(); Formatter f = new Formatter(sb, Locale.FRANCE); int a = 1234; int b = 5; f.format("PI is %25.18f!", Math.PI); System.out.println(sb); } }
PI is 3,141592653589793000!