static String getString ( char c , int n ) { StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < n ; i ++ ) { sb . append ( c ) ; } return sb . toString ( ) ; }
Creates a string of the given length consisting of the given character