package com.sf.day06;

/**
 * ikun类   object类是所有对象的父类
 */
public class IKun {

    /**
     * 属性
     */
   public String name;
   public String hair;
   public int age;

   //   IKun{name='蔡徐坤', hair='中分', age=18}
    @Override
    public String toString() {
        return "IKun{" +
                "name='" + name + '\'' +
                ", hair='" + hair + '\'' +
                ", age=" + age +
                '}';
    }

    /**
     *
     * 方法
     */
    public void playBask(){
        System.out.println("IKun打篮球");
    }

    /**
     * 重载方法
     */
    public void playBask(String name,int age){
        System.out.println(age+"岁的"+name+"打篮球");
    }

}
