Can I use enum intead of switch case

后端 未结 0 1713
有刺的猬
有刺的猬 2020-11-21 05:51

I have a method that gets the value based on a code. I am using switch case for this purpose. My code is here:

    String getFruit(char code) {
        switch         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题