package com.lovecding.day07.oop06;

public class MethodParams {

    //基本数据类型
    public void  m1(int i){
        System.out.println(i);
    }

    //引用数据类型
    public void  m2( Person person ){
        person.eat();
    }

    //数组
    public void  m3( int[] arr ){
        //遍历
        for (int i : arr) {
            System.out.print(i+",");
        }
    }

    public static void main(String[] args) {
        MethodParams m1 = new MethodParams();
        m1.m1(10);

        Person person = new Person();
        m1.m2(person);

        int[] arr = {1,2,3};
        m1.m3(arr);

    }
}
