Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For example, the following example both the Customer and Person objects contain an instance or collection of object contains both a Person object and a collection of Page objects. The Person object also contains a Page object.

Code Block
public class Customer implements Serializable {
  private String name;
  private Collection<String> phoneNumbers;
  private Collection<Person> contacts;
  private Page[] myHomePages;
  ......
}
public class Person implements Serializable {
  private String name;
  private String email;
  private int revenue;
  private String address;
  private String[] phoneNumbers;
  private Page homepage;
  .......
}
public class Page implements Serializable {
  private int id; // search integer in int format
  private String title;
  private String content;
  ......
}

...