Created
March 11, 2014 02:23
-
-
Save jameswomack/9478334 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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