Why are variables not local in case statements?

前端 未结 6 1438
暖寄归人
暖寄归人 2020-12-10 14:03

I recently add another menu item to an android java app and was suprised that Eclipse said that variable from the previous case:break were not local (So I\'ve just added a s

6条回答
  •  囚心锁ツ
    2020-12-10 14:10

    Because you're not supposed to write much code / logic there - break these out into methods.

提交回复
热议问题