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

问题:

[单选]

public class Foo { 
public int a; 
public Foo() { a = 3; } 
public void addFive() { a += 5; } 
} 
and: 
public class Bar extends Foo {
public int a; 
public Bar() { a = 8; } 
public void addFive() { this.a +=5; } 
} 
invoked with: 
Foo foo = new Bar(); 
foo.addFive(); 
System.out.println(”Value: “+ foo.a); 
What is the result?() 

A .  Value: 3
B .  Value: 8
C .  Value: 13
D .  Compilation fails.
E .  The code runs with no output.
F .  An exception is thrown at runtime.

人力绞磨使用时,绞磨架必须固定,牵引绳应水平进入磨芯,下进上出在磨芯上缠绕不应少于()圈。 3。 5。 7。 9。 在电缆回路中,两导线间都有一定的电容量,其导线直径越(),距离越近,长度越()时,电容量越大。 大。 小。 长。 短。 远。 近。 标准田径场跑道宽度是1.22米或1.25米。 田赛远度项目,前三轮试掷(跳)结束后,成绩优的8名运动员进入后三轮的试掷(跳),后三轮试掷(跳)的顺序应按成绩倒排序。 《普洛登报告书》

public class Foo { 
public int a; 
public Foo() { a = 3; } 
public void addFive() { a += 5; } 
} 
and: 
public class Bar extends Foo {
public int a; 
public Bar() { a = 8; } 
public void addFive() { this.a +=5; } 
} 
invoked with: 
Foo foo = new Bar(); 
foo.addFive(); 
System.out.println(”Value: “+ foo.a); 
What is the result?() 

参考答案:

  参考解析

本题暂无解析

在线 客服