package com.lovecding.day07.oop06;

import java.util.Arrays;

public class MethodParams2 {

    public void m1( int i){
        System.out.println(i+10);
    }


    //数组中数字+10；
    public void m2( int[] arr){
        for (int i = 0; i < arr.length; i++) {
            arr[i] = arr[i]+10;
        }
    }

    public static void main(String[] args) {
        MethodParams2 m = new MethodParams2();

        m.m1(10);

        int[] arr = {1,2,3};
        //调用方法
        m.m2(arr);

        System.out.println(Arrays.toString(arr));
    }
}
