方法的重载
作者:互联网
package method; public class base2 { public static void main(String[] args) { double Max=max(88.0,4.0); System.out.println(Max); } public static double max(double a,double b){ double result=0; if (a==b){ System.out.println("a==b"); return 0; } if (a<b){ return 0; } else return 0; } public static int max(int a,int b){ int result =0; if (a==b){ System.out.println("a=b"); return 0; } if (a<b){ result=b; } else{ result=a; } return result; } }
标签:double,System,static,Max,重载,方法,public,out 来源: https://www.cnblogs.com/xu529/p/16562697.html