注:並行收集器:會觸發Stop the world,停止用戶線程 併發收集器:會與其他用戶線程併發執行
文章目錄switch 與 if-elseif-else 與 三目表達式 switch 與 if-else 結論:一般情況下,switch的效率高於if-else語句 原理: if …else走邏輯判斷時,每條if語句都獨立需要