当前位置:SCJP程序员认证考试题库

问题:

[单选]

public class Test { 
public enum Dogs {collie, harrier, shepherd}; 
public static void main(String [] args) { 
Dogs myDog = Dogs.shepherd; 
switch (myDog) { 
case collie: 
System.out.print(”collie “); 
case default: 
System.out.print(”retriever “);
case harrier: 
System.out.print(”harrier “); 
} 
} 
} 
What is the result?() 

A .  harrier
B .  shepherd
C .  retriever
D .  Compilation fails.
E .  retriever harrier
F .  An exception is thrown at runtime.

先锋派电影运动 照刷,磨勘制度 碳素钢中焊接性能最好的是()。 低碳钢。 中碳钢。 高碳钢。 高合金钢。 机电工程、属于工厂制造的桥梁金属构件不小于()为合格。 90。 95。 75。 60。 管弦乐队的乐器排列图中舞台中心的是() 圆号。 大提琴。 第一小提琴。 中提琴。

public class Test { 
public enum Dogs {collie, harrier, shepherd}; 
public static void main(String [] args) { 
Dogs myDog = Dogs.shepherd; 
switch (myDog) { 
case collie: 
System.out.print(”collie “); 
case default: 
System.out.print(”retriever “);
case harrier: 
System.out.print(”harrier “); 
} 
} 
} 
What is the result?() 

参考答案:

  参考解析

本题暂无解析

在线 客服