package com.lovecoding.day08.oop01;

public class Student {

    String name;

    int age;

    //设置
    //区分 使用 this
    public void setName( String name ){
        System.out.println("this"+this);
        this.name = name;
    }

    //有歧义 需要用this区分
    //区分成员变量和局部变量
    public void setAge( int age ){
        this.age = age;
    }

    //可以省略
    public void showInfo(){
        System.out.println("name:"+this.name+",age:"+age);
    }


}
