Bad practice or frowned upon to use a comma to separate cases? Switch case statement Java

后端 未结 0 1827
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-02 10:50

is it considered bad practice to write a switch case statement with a comma such as this:

switch(name)
{
case \'a\', \'A\' :
break;
}

Rather

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