Skip to content

Instantly share code, notes, and snippets.

@jameswomack
Created March 11, 2014 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jameswomack/9478334 to your computer and use it in GitHub Desktop.
Save jameswomack/9478334 to your computer and use it in GitHub Desktop.
public class DepartmentStore {
private String name;
private String location;
public DepartmentStore(String someName, String someLocation) {
name = someName;
location = someLocation;
}
public String getTitle() {
return name + " " + location;
}
public void setLocation(String someLocation) {
location = someLocation;
}
public static void main(String[] args) {
DepartmentStore atré = new DepartmentStore("Atré", "品川");
System.out.println(atré.getTitle());
atré.setLocation("原宿");
System.out.println(atré.getTitle());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment