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

问题:

[单选] A member variable defined in a class can be accessed only by the classes in the same package. Which modifier should be used to obtain the access control?()         

A .  private
B .  no modifier
C .  public
D .  protected

如图是大豆种子的部分结构示意图,下列有关叙述中,错误的是() 大豆种子萌发时,图中④提供营养物质。 豆芽菜可供食用部分主要由图中①发育而来。 ⑥即是大豆种子的主要部分,又是新植物体幼体。 大豆种子与玉米,水稻种子相比,玉米,水稻种子中没有⑥。 Inbound Links指的是以下哪一种?() 内部链接。 反向链接。 导出链接。 public class Parent {  public int addValue( int a, int b) {     int s;     s = a+b;     return s;     }     }  class Child extends Parent {  }  Which methods can be added into class Child?()     int addValue( int a, int b ){// do something...}。  public void addValue (){// do something...}。  public int addValue( int a ){// do something...}。  public int addValue( int a, int b )throws MyException {//do something...}。 http:/www.domain.com/A/a.html和http:/www.domain.com/a.html从逻辑结构上看()。 前者比后者层级深。 后者比前者层级深。 二者层级相同。 无法比较二者的层级。 空压机压力一般调节调整为() 0.45-0.65MPa。 0.55-0.75MPa。 0.55-0.85MPa。 A member variable defined in a class can be accessed only by the classes in the same package. Which modifier should be used to obtain the access control?()         
参考答案:

  参考解析

一个类中定义的成员变量只能被同一包中的类访问。

在线 客服