首先创建一个person3类
    image.png

    然后创建一个test4 调用这个类
    image.png

    写法2
    image.png
    这种写法可以直接调用
    image.png

    image.png