package com.lovecding.day07.oop06;

public class MethodParams3 {

    public int m1(){
        return 10;
    }

    public int m2( int m){
        return m;
    }

    public static void main(String[] args) {
        MethodParams3 m = new MethodParams3();
        //赋值
       int i = m.m1(); //10
        System.out.println("i="+i);

        //操作
        if (m.m1() == 10){
            System.out.println("等于10");
        }

        System.out.println(m.m1() + 10);

        //当做参数
        int i1 = m.m2(m.m1());
        System.out.println(i1); //10

        //很少 单独调用
        m.m1();
    }
}
