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

问题:

[单选]

interface Animal { 
void soundOff(); 
} 
class Elephant implements Animal { 
public void soundOff() { 
System.out.println(“Trumpet”); 
} 
} 
class Lion implements Animal { 
public void soundOff() {
System.out.println(“Roar”); 
} 
} 
class Alpha1 { 
static Animal get( String choice ) { 
if ( choice.equalsIgnoreCase( “meat eater” )) { 
return new Lion(); 
} else { 
return new Elephant(); 
} 
} 
} 
Which compiles?()  

A .  new Animal().soundOff();
B .  Elephant e = new Alpha1();
C .  Lion 1 = Alpha.get(“meat eater”);
D .  new Alpha1().get(“veggie”).soundOff();

公共政策主体能力 保险规划具体包括()  提出家庭保障建议。  保障需求的检测与调整。  确定家庭应投保标的、保障优先级、保险额度。  分析客户家庭的保险需求。 若气缸表面被拉伤(拉缸)时气缸压力应该是()。 高。 低。 正常。 较低。 以下对于网站导航优化说法错误的是() 使用嵌入JS文件的方式实现网站导航。 使用图片作为网站导航链接。 使用JS代码实现的下拉菜单。 网站导航链接使用文字链接。 当事人陈述一旦有效作出,当事人便不得再就所承认的事实进行争执,也不得任意撤回。这是由当事人该类诉讼行为的有效性所决定的,也是诉讼中()的体现。 禁止反言。 禁止撤诉。 撤诉有效。 诉讼中止。

interface Animal { 
void soundOff(); 
} 
class Elephant implements Animal { 
public void soundOff() { 
System.out.println(“Trumpet”); 
} 
} 
class Lion implements Animal { 
public void soundOff() {
System.out.println(“Roar”); 
} 
} 
class Alpha1 { 
static Animal get( String choice ) { 
if ( choice.equalsIgnoreCase( “meat eater” )) { 
return new Lion(); 
} else { 
return new Elephant(); 
} 
} 
} 
Which compiles?()  

参考答案:

  参考解析

本题暂无解析

在线 客服