public String frontTimes(String str, int n) {
  String front = "";
  String result = "";
  
  if (str.length() < 3) {
    front += str;
  } else {
    front += (str.substring(0, 3));
  }
  
  for (int i = 0; i < n; i++) {
    result += front;
  }
  return result;
}

@@ -1,8 +1,642 @@
+package warmup2;%0A%0A/*%0A * Given a string and a non-negative int n,     * we'll say that the front of the string is the * first 3 chars, or whatever is there if the *string is less than length 3. Return n copies  *of the front; %0A%0A * frontTimes(%22Chocolate%22, 2) %E2%86%92 %22ChoCho%22%0A * frontTimes(%22Chocolate%22, 3) %E2%86%92 %22ChoChoCho%22%0A * frontTimes(%22Abc%22, 3) %E2%86%92 %22AbcAbcAbc%22%0A */%0A%0Apublic class FrontTimes %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A        FrontTimes test = new FrontTimes();%0A        System.out.println(test.frontTimes(%22Hi%22, 2));%0A        System.out.println(test.frontTimes(%22Hi%22, 3));%0A        System.out.println(test.frontTimes(%22Hi%22, 1));%0A%09%7D%0A%0A
 public S
@@ -893,8 +893,10 @@
 sult;%0A%7D%0A
+%7D%0A

Update FrontTimes