public static String repeat(String str,int count){
  final StringBuilder result=new StringBuilder();
  for (int i=0; i < count; i++) {
    result.append(str);
  }
  return result.toString();
}

public static String repeat ( String str , int count ) { final StringBuilder result = new StringBuilder ( ) ; for ( int i = 0 ; i < count ; i ++ ) { result . append ( str ) ; } return result . toString ( ) ; }
repeats the specified substring count times .
