You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//...............We cannot make 2 constructor in solidity, we can do that in other languages and goes by the term constructor overloading, but in solidity we have to do that in the same constructor.
// soo we can instead do:
contract Local {
uint public count;
uint public num;
constructor(uint new_count, uint new_num) {
count = new_count;
num = new_num;
}
}
/*
Executed only once.
A default constructor is created by the compiler if there is no explicitly defined constructor.