import java.util.*;
public class Study {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Please enter the first digit: ");
int a = sc.nextInt();
System.out.print("Please enter the second digit: ");
int b = sc.nextInt();
System.out.print("Please enter the third digit: ");
int c = sc.nextInt();
int max = a > b ? a : b;//1 ? 2 : 3如果1为true,则取2的值。反之就取3的值。{三元运算符}
max = max > c ? max : c;
System.out.print("The max is :"+max);
}
}
三元运算符:1? 2:3 //如果1为true 则取2,反之则取3;