Skip to content

Instantly share code, notes, and snippets.

@anhnguyen1618
Created September 7, 2016 21:05
Show Gist options
  • Save anhnguyen1618/ea97ad87c7b467980f81c4fb9ffe3ecc to your computer and use it in GitHub Desktop.
Save anhnguyen1618/ea97ad87c7b467980f81c4fb9ffe3ecc to your computer and use it in GitHub Desktop.
public class Change {
private char a;
private char b;
public Change(char a, char b){
this.a=a;
this.b=b;
}
public String change(String word){
return word.replace(this.a, this.b);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment