上代码:
package hello;import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);int a,b,c;a = in.nextInt();b = in.nextInt();c = in.nextInt();int num = max(a,b,c);System.out.println("最大数是"+num);}public static int max(int a,int b,int c){return max(a,max(b,c));}public static int max(int a,int b) {if (a>b) return a;else return b;}
}