Code example for Formatter

0
    @Override 
    public PrintStream printf(Locale l, String format, Object... args) {
        return format(l, format, args);
    } 
 
    private final Formatter formatter = new Formatter(builder, null);
 
    @Override 
    public synchronized PrintStream format(
            Locale l, String format, Object... args) {
        if (format == null) {
            throw new NullPointerException("format");
        } 
 
        formatter.format(l, format, args);
        flush(false); 
        return this;
    } 
 
    @Override 
    public synchronized void print(char[] charArray) {