一、三元运算符简单使用
1.先看一个小栗子
int score = 80;
String isPass = score>=60?"及格":"不及格";
System.out.println(isPass);
Run:
及格
2.使用方法
String isPass = score>=60?“及格”:“不及格”;
X ? Y : Z
如果 X 为true 就返回 Y
反之返回 Z 。
1.先看一个小栗子
int score = 80;
String isPass = score>=60?"及格":"不及格";
System.out.println(isPass);
Run:
及格
2.使用方法
String isPass = score>=60?“及格”:“不及格”;
X ? Y : Z
如果 X 为true 就返回 Y
反之返回 Z 。
Java word通過html設置樣式(Spire Docx) <dependencies> <!-- Apache POI dependency for Word --> <dependency>
01 引言 作爲後端開發人員,對Redis肯定不陌生,它是一款基於內存的數據庫,讀寫速度非常快。在愛奇藝海外後端的項目中,我們也廣泛使用Redis,主要用於緩存、消