The newly created file contains a skeleton for a class called Guest.
A class stores information in its instance variables (also referred to as data members). Here you're declaring three instance variables for Guest: name, email, and comments. Note that these declarations are the same as those that appeared in the code for Main.java when you added the three variables using WebObjects Builder. In WebObjects, a component is also a class, specifically a subclass of the class next.wo.Component (called WOComponent in WebScript or Objective-C).
Java classes require a constructor to initialize an instance (or object) of a particular class whenever one is created. A constructor has the same name as the class and returns no value.
Whenever your application creates a new Guest class, its instance variables are initialized with empty strings, which is the default value if the user enters no data. (If you prefer, you can use different strings for these initial values.)
Saving the file lets WebObjects Builder know about your newly created Guest class.
Table of Contents Next Section