Menu

Task Write Static Method Called Repeatstring Takes Input String Parameter Word Followed In Q43888335

TASK: Write a static method called repeatString that takes as input a String parameter word followed by an int parameter num.plz use java.TASK: Write a static method called repeatString that takes as input a String parameter word followed by an int parameter num. It should return a String that would be the result of repeating word exactly num times. If num is 0 or negative, the method should output an empty string. Sample Input 1: Marcia 3 Sample Output 1: MarciaMarciaMarcia Sample Input 2: Marcia 0 Sample Output 2: Write a program, test using stdin – stdout Time limit: 8 seconds Memory limit: 256 MB 1 // YOUR CODE HERE 3. Show transcribed image text TASK: Write a static method called repeatString that takes as input a String parameter word followed by an int parameter num. It should return a String that would be the result of repeating word exactly num times. If num is 0 or negative, the method should output an empty string. Sample Input 1: Marcia 3 Sample Output 1: MarciaMarciaMarcia Sample Input 2: Marcia 0 Sample Output 2: Write a program, test using stdin – stdout Time limit: 8 seconds Memory limit: 256 MB 1 // YOUR CODE HERE 3.

Expert Answer


Answer to TASK: Write a static method called repeatString that takes as input a String parameter word followed by an int parameter…

OR