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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!