三目运算符:
int score = 80;
int x = -100;
String type = score > 60 ? "及格" : "不及格";
int flag = x > 0 ? 1 : (x == 0 ? 0 : -1);
System.out.println("type= " + type); //输出及格
System.out.println("flag= "+ flag); //输出-1
转义字符:
'\t' tab键
'\r' 回车
'\n' 换行
'\b' 退格
\是转义符