Java provides the two basic forms of the if statement. Note that the test must be surrounded by parentheses. It executes the first if the test evaluates to true and the second if it evalutes to false. Java does not provide a special facility for nesting if statements. Classes can include constructors that describe how to create such objects.
Constructors can have parameters that are used in the initialization of the object.
Constructors look very much like methods, with the difference that they have the same name as the class. This is particularly important for constructors, as there are many different ways that we may want to describe a new object. If you don't declare any constructors, Java uses a default constructor with no parameters. If you do declare constructors, that default constructors is no longer available. When building classes for this course, you should always define constructors.