Contract Constructor
More about Solidity
As a segue to learning about the object-oriented programming aspect of Solidity, we will touch upon contract constructors. Similar to class constructors in other languages, constructors in Solidity allow us to define the state of a contract at the time of initialization.
Syntax
Below is the general syntax for a contract constructor:
Example
Below is an example of a contract constructor in action: