return关键字的作用和接受实验

package com.Summer_0419.cn;

/**
 * @author Summer
 * 查看return关键字的作用,实验目的:
 * 1.传入两个实参查看输出结果
 * 2.传入两个无参数变量,查看输出结果
 * 3.输出返回值的方法
 */
public class Test_Method01 {

    public static void main(String[] args) {
        int i = show(9527,3.1415);
        System.out.println("在这里输出返回值"+i);//
        show(i, i);//用show方法调用两个int和double类型的无参数值
        show(9527,3.1415);
    }

    private static int show(int b,double d) {
        int a = 100;
        System.out.println("HelloWorld"+a+" "+" "+b+" "+d);
        return 10086;
        
        
    }

}
原文地址:https://www.cnblogs.com/summerdata/p/10738608.html