Java Practice It || 4.2 repl || for loop, String and int parameter method, String return

preview_player
Показать описание
Problem:

Question:
Write a method named repl that accepts a String and a number of repetitions as parameters and returns the String concatenated that many times. For example, the call repl("hello", 3) returns "hellohellohello". If the number of repetitions is 0 or less, an empty string is returned.
Рекомендации по теме