Question: Create a program named Methods.java and implement the following methods in java: public static string repeat(int num, String info), it will repeat the string info
Create a program named Methods.java and implement the following methods in java:
public static string repeat(int num, String info), it will repeat the string "info" num times and return it as a new string. For example calling repeat(3,"Java") should return: JavaJavaJava
public static void print(int repeat, String info), it prints the info multiple times as specified by repeat. For example calling print(3 "Java"), this method should print "java" 3 times as shown below:
Java
Java
Java
NB. pass multiple words as single argument, you need to put them inside double quotation marks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
