报告在
switch
语句的一个分支中声明并在另一个分支中使用的局部变量。 此类声明可能格外令人困惑。
示例:
switch(i) { case 2: int x = 0; break; case 3: x = 3; System.out.println(x); break; }