Why does the case statement doesn't take variables? <p>I know that this is a silly question,but I wanted to know why the case label doesn't take variables. The code is-</p> <pre><code>public class Hello { public static void main(String[] args) { final int y=9; int a=1,b=2,c=3; switch(9) { case y: { System.out.println("Hello User"); break; } case a: { System.out.println("Hello World"); break; } case b: { System.out.println("Buff"); break; } default: { System.out.println("Yo bitch"); break; } } } } </code></pre> <p>Although, I have initialized a,b and c,yet it is showing errors.Why?</p>