Example:
address public owner;
Also, if we don't make a variable public manually, what is the default, private?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communitySee https://programtheblockchain.com/posts/2018/01/02/making-smart-contracts-with-public-variables/ for a full explanation.
Yes, the default visibility for state variables is internal
(as per v0.8.4). Marking it public
makes it easy to read the variable in a DApp or from another smart contract.