Skip to content

Instantly share code, notes, and snippets.

@dkincaid
Created August 6, 2012 19:19
Show Gist options
  • Save dkincaid/3277712 to your computer and use it in GitHub Desktop.
Save dkincaid/3277712 to your computer and use it in GitHub Desktop.
Change Name
public MutableClass changeName(MutableClass oldNameClass, String newName) {
MutableClass newNameClass = new MutableClass();
newNameClass = oldNameClass;
newNameClass.setName(newName);
return newNameClass;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment