运行下面这段代码的结果为________________。int day = 3;switch(day){ case 1: case 3: case 5: System.out.print("学钢琴!"); break; case 2: System.out.print("学英语!"); default: System.out.print("去必胜客吃饭!");}
A. 学钢琴!
B. 学钢琴!学英语!
C. 学钢琴!去必胜客吃饭!
D. 没有任何输出
将以下哪种方法插入到第6行是不合法的( ) 。1.public class Test1 { 2. public float aMethod(float a,float b) throws 3. IOException { } 4. } 5.public class Test2 extends Test1{ 6. 7.}
A. float aMethod(float a,float b){ }
B. public int aMethod(int a,int b)throws Exception{ }
C. public float aMethod(float p,float q){ }
D. public int aMethod(int a,int b)throws IOException{ }