private String fill ( char symbol , int times ) { char [ ] result = new char [ times ] ; for ( int i = 0 ; i < times ; i ++ ) { result [ i ] = symbol ; } return new String ( result ) ; }
Returns string of specified length filled with specified symbol