Java PrintWriter Print putCharAtLevel(PrintWriter out, int level, char c)

Here you can find the source of putCharAtLevel(PrintWriter out, int level, char c)

Description

put Char At Level

License

LGPL

Declaration

private static void putCharAtLevel(PrintWriter out, int level, char c) 

Method Source Code


//package com.java2s;
// terms of the Lesser GNU General Public License (LGPL)

import java.io.*;

public class Main {
    private static int[] position;

    private static void putCharAtLevel(PrintWriter out, int level, char c) {
        int n = position[level] - 1;
        for (int i = 0; i < n; i++) {
            out.print(' ');
        }//from   w  w w.  j  a  v a 2 s  .co m
        out.print(c);
    }
}