Issue
What is the use of the new
keyword for creating new smart contracts? Why not just omit this keyword?
Solution
You cannot omit the new
keyword for creating new contracts.
In the case of:
token = new Token;
A new contract is created and the address is passed to
token
.In the case of:
token = existingToken;
existingToken
has to be an existing contract (already created) andtoken
will be passed the current address ofexistingToken
.
Answered By - RFV Answer Checked By - Cary Denson (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.