fork download
  1.  
  2. public class Address
  3. {
  4. private String street;
  5. private String state;
  6. private String city;
  7. private String zip;
  8. private String phone;
  9.  
  10. public String getStreet()
  11. {
  12. return street;
  13. }
  14.  
  15. public void setStreet(String street)
  16. {
  17. this.street = street;
  18. }
  19.  
  20. public String getState()
  21. {
  22. return state;
  23. }
  24.  
  25. public void setState(String state)
  26. {
  27. this.state = state;
  28. }
  29.  
  30. public String getCity()
  31. {
  32. return city;
  33. }
  34.  
  35. public void setCity(String city)
  36. {
  37. this.city = city;
  38. }
  39.  
  40. public String getZip()
  41. {
  42. return zip;
  43. }
  44.  
  45. public void setZip(String zip)
  46. {
  47. this.zip = zip;
  48. }
  49.  
  50. public String getPhone()
  51. {
  52. return phone;
  53. }
  54.  
  55. public void setPhone(String phone)
  56. {
  57. this.phone = phone;
  58. }
  59.  
  60.  
  61. }
  62.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:2: error: class Address is public, should be declared in a file named Address.java
public class Address 
       ^
1 error
stdout
Standard output is empty