Question : solidity public string
Answered by :
// SPDX-License-Identifier: MIT
// compiler version must be greater than or equal to 0.7.6 and less than 0.8.0
pragma solidity ^0.7.6;
contract HelloWorld { string public greet = "Hello World!";
}
Source : https://solidity-by-example.org/hello-world/ | Last Update : Tue, 13 Jul 21