public static String repeat ( char c , int n ) { char [ ] array = new char [ n ] ; Arrays . fill ( array , c ) ; return String . valueOf ( array ) ; }
Creates a string consisting of n times the given character .