// Repeat the given string exactly n times import java.util.Collections object StringRepeat { def repeatStr(times: Int, str: String): String = { str * times } }