All pastes #939236 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-03-12 03:56 UTC
rendered paste body
public String changeXY(String str) {
    int index = str.indexOf("x");
    if(index == -1) {
        return str;
    }
    String answer = str.substring(0, index) + "y"
                  + str.substring(index + 1, str.length());
    return changeXY(answer);
}