@@ -0,0 +1,159 @@
+public String repeatEnd(String str, int n) %7B%0A  String out=%22%22, segment = str.substring(str.length()-n);%0A  for (int i=0; i%3Cn; i++) out+=segment;%0A  return out;%0A%7D%0A

Create repeatEnd.java