updating switchDemo.java