public class Test2 { public static void main(String[] args) { //语法:数据类型 变量名 = boolean表达式 ? 字面值1 :字面值2; int x = false ? 10 : 20; System.out.println(x);
}
}
public class Test2 { public static void main(String[] args) { //语法:数据类型 变量名 = boolean表达式 ? 字面值1 :字面值2; int x = false ? 10 : 20; System.out.println(x);
}
}