Java文档说
Java编译器通常使用String对象生成比使用链式if-then-else语句更高效的字节码.
AFAIK even String in switch在.equals()内部以区分大小写的方式使用.那么它们在这种背景下的效率是多少.编译速度更快?字节码少?更好的性能?
.equals()
java string if-statement switch-statement
if-statement ×1
java ×1
string ×1
switch-statement ×1