报告在 switch 语句的一个分支中声明并在另一个分支中使用的局部变量。 这样的声明可能极其令人混淆。

示例:


    switch(i) {
      case 2:
          int x = 0;
          break;
      case 3:
          x = 3;
          System.out.println(x);
          break;
    }