switchDemo.java updates