@@ -0,0 +1,302 @@
+public String reverse(String str) %7B%0A  return new StringBuilder(str).reverse().toString();%0A%7D;%0A%0Apublic String mirrorEnds(String string) %7B%0A  String end = %22%22;%0A  for (int i=string.length(); i%3E=0; i--) %7B%0A    end = string.substring(0, i);%0A    if (string.endsWith(reverse(end))) return end;%0A  %7D%0A  return %22%22;%0A%7D%0A

Create mirrorEnds.java