My switch-case statement works perfectly fine yesterday. But when I run the code earlier this morning eclipse gave me an error underlining the case statements in color red a
Unchecking "Is Library" in the project Properties worked for me.