【单选题】【消耗次数:1】
在使用interface声明一个接口时,只可以使用( )修饰符修饰该接口。
private
protected
private protected
public
参考答案:
复制
纠错
相关题目
【单选题】 下面对protected修饰符说法正确的是
①  只能在派生类中访问
②  只能在所属的类中访问
③  能在当前应用程序中访问
④  能在所属的类或派生类中访问
【单选题】 声明成员变量时,如果不使用任何访问控制符(public, protected, private),则以下哪种类型的类不能对该成员进行直接访问 ( )
①  同一类
②  同一包中的子类
③  同一包中的非子类
④  不同包中的子类
【单选题】 如果希望某个变量只可以被类本身访问和调用,则应该使用下列哪一种访问控制修饰符( )。
①  private
②  protected
③  private protected
④  public
【单选题】 若需要定义一个类域或类方法,应使用哪种修饰符?( )
①  static
②  package
③  private
④  public
【单选题】 若需要定义一个类域或类方法,应使用哪种修饰符?( )
①  static
②  package
③  private
④  public
【单选题】 下列哪种类成员修饰符修饰的变量只能在本类中被访问?( )
①  protected
②  public
③  default
④  private
【判断题】 printf函数中可以有修饰符
①  正确
②  错误
【单选题】 访问修饰符作用范围由大到小是( )
①  private-default-protected-public
②  public-default-protected-private
③  private-protected-default-public
④  public-protected-default-private
【单选题】 关于被私有访问控制符private修饰的成员变量,以下说法正确的是( )
①  可以被三种类所引用:该类自身、与它在同一个包中的其他类、在其他包中的该类的子类
②  可以被两种类访问和引用:该类本身、该类的所有子类
③  只能被该类自身所访问和修改
④  只能被同一个包中的类访问
【简答题】 使用[填空1]修饰符能调用未实例化得类中的方法。
随机题目
【单选题】 The organization has developed several techniques useful to other groups ____ the similar work.
①  to do
②  do
③  does
④  doing
【单选题】 ____ it is you found, you must give it back to the person it belongs to.
①  That
②  Because
③  Whatever
④  However
【单选题】 If you don’t think it necessary to make ____ any missed lessons, speak up now.
①  up for
②  up with
③  up to
④  away for
【单选题】 No sooner had he sat down to lunch ____ there was a knock at the door.
①  when
②  that
③  as
④  than
【单选题】 When the teacher had ____through with the class, they felt very ashamed.
①  gone
②  got
③  done
④  taken
【单选题】 “Which of these two ties will you take?” “I’ll take ____to give me a change sometimes.”?
①  either ?
②  both ?
③  neither ?
④  all?
【单选题】 No one, except his two best friends ____his joy or sorrow in his life.
①  shares
②  share
③  sharing
④  to share
【单选题】 He would like to view difficulties ____ a kind of challenge.
①  with
②  on
③  of
④  as
【单选题】 As a result of the unfavorable working conditions, the project has to be put off____.
①  temporarily
②  tremendously
③  traditionally
④  typically
【单选题】 1.—Did you accept his invitation? — ____bet I did.
①  I
②  You
③  People
④  They