Given a string, return a version where all the "x" have been removed. Except an "x" at the very start or end should not be removed.


public String stringX(String str) {
String a = "";
for (int...