三目运算符
1 import java.util.Scanner;
2
3
4 //三目运算符
5 public class SingleQuestion{
6 public static void main(String args[]){
7 int x = 10;
8 int y = 9;
9 int max = x > y ? x : y;
10 System.out.println("较大的数字是:"+ max);
11 }
12 }