switch支持对enum和sealed Classes完整性校验. 通常,switch case类型匹配时,如果是引用类型比如Object或String,需要增加default分支来处理case不能覆盖的情况.
確定! 回上一頁