Code Listing 3: The User class

public class User
{
  private String name;

  public void setName(String name) {
    System.out.println("User.setName() called.");
    this.name = name;
  }

  public String getName() {
    System.out.println("User.getName() called");
    return name;
  }
}

E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy