Constructor

The constructor method is a special method for creating and initializing a contract. In solidity v0.4.23, Solidity introduced this new constructor notation and the old one was deprecated.

//new
pragma solidity ^0.4.24;
contract HelloWorld {
function constructor() public {
// ...
}
}
//deprecated
pragma solidity ^0.4.22;
contract HelloWorld {
function HelloWorld () public {
// ...
}
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.253.223