Write a method called repl that accepts a String and a number of repetitions as parameters and

Question:

Write a method called 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) should return "hellohellohello". If the number of repetitions is zero or less, the method should return an empty string.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: