Results 1 to 2 of 2
Like Tree1Likes
  • 1 Post By Junky

Thread: How do you code this?

  1. #1
    mrst30 is offline Member
    Join Date
    Apr 2013
    Rep Power

    Question How do you code this?

    Coding a simple class in JAVA classed. Code has to inlcude the following.
    Variables (name, age, addressStreet, city, state, zip, country)
    Setter and Getter methods
    public void setName(String name) { = name;

    public String getName() {
    return name;

    Please help!!!

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Rep Power

    Default Re: How do you code this?

    What specific problems are you having?
    The example shows the getter and setter method for name. Now all you have to do is the getter and setter methods for all the other variables (once you have declared them) and possibly a constructor.
    mrst30 likes this.

Similar Threads

  1. Replies: 16
    Last Post: 01-31-2012, 08:36 PM
  2. Replies: 3
    Last Post: 08-10-2011, 09:17 AM
  3. Replies: 0
    Last Post: 08-07-2011, 08:32 PM
  4. Replies: 0
    Last Post: 02-21-2011, 11:50 AM
  5. Replies: 1
    Last Post: 04-26-2007, 03:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts