Implement the print3 method. The method should display the passed string (word) three times, but on the same line.
Words must be separated by a space and should not merge into one.
(THIS IS MY CODE BUT IT IS WRONG)
public class Solution {
public static void print3(String s) {
System.out.println("word" + " ");
}
iIM STUCKKKKK
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
AnnemiekFF
15 May 2020, 07:06
You hardcode the word "word", but you should use the passed String s.
0