16构造函数

一调用合约就启动

// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;

contract Consturctor{
    address public owner;
    uint public x;

    constructor(uint _x){
        owner=msg.sender;
        x=_x;
    }
}