I have written small code in java 6
public class TestSwitch{ public static void main(String... args){ int a = 1; System.out.println("start");
You have wrong closing braces before case 2. case 3,4 are interpreted as labels not cases.