Write a method called multiConcat that takes a String and an integer as parameters. Return a String that consists of the string parameter concatenated with itself count times, where count is the integer parameter. For example, if the parameter values are "hi" and 4, the return value is "hihihihi". Return the original string if the integer parameter is less than 2.
What will be an ideal response?
```
public String multiConcat(String text, int count)
{
String result = text;
if (count > 1)
for (int i=2; i <= count; i++)
result += text;
return result;
}
```
Computer Science & Information Technology
You might also like to view...
MC The last line number in a traceback indicates the__________ .
a) throw point. b) catch point. c) handle point. d) None of the above.
Computer Science & Information Technology
A(n) ________ network is often the type of network that is set up in a home or very small business
Fill in the blank(s) with correct word
Computer Science & Information Technology
Which of the following is NOT the name of a current family of Intel processors?
A. Duo B. Core C. Atom D. Celeron
Computer Science & Information Technology
CentOS 7 needs at least __________ partition(s) for its root file system
one two three four
Computer Science & Information Technology