May 2003
Beginner
624 pages
15h 47m
English
Recall that a class is an abstract definition listing the functionality that is provided. In addition to properties and methods, classes contain constructors. A constructor is a special method that is used to create an instance of the class.
![]() | In a later section, “Calling an Object's Methods,” we'll discuss what, exactly, methods are. For now you can think of a method as a function or subroutine. Like functions and subroutines, a method is a means of encapsulating a number of program instructions and, again like functions and subroutines, can have zero or more parameters. |
Constructors always have the same name as the class. For ...
Read now
Unlock full access