Java switch : variable declaration and scope

后端 未结 7 665
予麋鹿
予麋鹿 2020-12-11 03:14

How does the Java compiler handle the following switch block ? What is the scope of the \'b\' variable ?

Note that the \'b\' variable is declared only in the first b

7条回答
提交回复
热议问题