Advertisement
Guest User

Address

a guest
Apr 25th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1.  
  2. public class Address {
  3. public String street;
  4. public String city;
  5. public int postcode;
  6. public String state;
  7.  
  8. public Address(String street, String city, int postcode, String state) {
  9. this.street = street;
  10. this.city = city;
  11. this.postcode = postcode;
  12. this.state = state;
  13. }
  14. // what's spesific address ??
  15. public String getStreet() {
  16. return street;
  17. }
  18.  
  19. public String getCity() {
  20. return city;
  21. }
  22.  
  23. public int getPostcode() {
  24. return postcode;
  25. }
  26.  
  27. public String getState() {
  28. return state;
  29. }
  30. public String Address(){
  31. return street + " " + city + " " + state + " " + postcode;
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement