更多“55________A. HoweverB. InsteadC. In totalD. in return”相关问题
  • 第1题:

    Whichfivemethods,insertedindependentlyatline5,willcompile?()

    A.publicintblipvert(intx){return0;}

    B.privateintblipvert(intx){return0;}

    C.privateintblipvert(longx){return0;}

    D.protectedintblipvert(longx){return0;}

    E.protectedlongblipvert(longx){return0;}

    F.protectedlongblipvert(intx,inty){return0;}


    参考答案:A, C, D, E, F

  • 第2题:

    Given:Which two methods, inserted independently at line 17, correctly complete the Sales class?()

    A.double getSalesAmount() { return 1230.45; }

    B.public double getSalesAmount() { return 1230.45; }

    C.private double getSalesAmount() { return 1230.45; }

    D.protected double getSalesAmount() { return 1230.45; }


    参考答案:B, D

  • 第3题:

    Given:Which code, inserted at line 15, allows the class Sprite to compile?()

    A.Foo { public int bar() { return 1; }

    B.new Foo { public int bar() { return 1; }

    C.new Foo() { public int bar() { return 1; }

    D.new class Foo { public int bar() { return 1; }


    参考答案:C

  • 第4题:

    函数的值通过rerurn语句返回,下面关于return语句的形式描述错误的是

    A.return表达式;

    B.return(表达式);

    C.一个return语句可以返回多个函数值

    D.一个return语句只能返回一个函数值


    正确答案:C
    解析: return语句中的表达式的值就是所求的函数值,此表达式值的类型必须与函数首部所说明的类型一致。如果类型不一致,则以函数值的类型为准,由系统自动进行转换。一个return语句只能返回一个值。

  • 第5题:

    能保证对所有的参数能够结束的递归函数是

    A.int f(int n){if(n<1)return 1;else return n*f(n+1);}

    B.int f(int n){if(n>1)return 1;else return n*f(n-1);}

    C.int f(int n){if(abs(n)<1)return 1;else return n*f(n/2);}

    D.int f(int n){if(n>1)return 1;else return n*f(n*2);)


    正确答案:C
    解析:递归函数的两个重要条件是要有结束和递归表达式。选项A、B、D无法结束。根据这两个条件可以进行判断出答案为C。

  • 第6题:

    下列函数中,哪项是正确的递归函数( )。

    A int Fun(int n)

    {

    if(n<1) return 1;

    else return n*Fun(n+1);

    }

    B) int Fun(ira n)

    {

    if(abs(n)<1) return 1;

    else return n*Fun(n/2);

    }

    C) int Fun(int n)

    {

    if(n>1) return 1;

    else return n*Fun(n*2)1

    }

    D) int Fun(int n)

    {

    if(n>1) return 1;

    else retun n*Fun(n-1);

    }

    A.A

    B.B

    C.C

    D.D


    正确答案:B
    解析:本题考查递归函数这个知识点。递归函数由递归出口和递归体两部分组成:递归出口给出了递归终止的条件;递归体给出了递归的方式。对于选项A,当参数n>=1时,不满足递归调用的结束条件;对于选项C,当参数n=0时,不满足递归调用的结束条件;对于选项D,当参数n:2时,不满足递归调用的结束条件。

  • 第7题:

    Rate of return(or return)on capital 资本收益率(或资本收益)


    正确答案: 在一项投资或一件资本品上的收益(yield)。比如,一项耗费100美元的投资每年带来12美元的收益,那么这项投资的收益率就是每年12%。

  • 第8题:

    return语句的一般形式包含()

    • A、return表达式;
    • B、return表达式
    • C、return(表达式);
    • D、return(表达式)

    正确答案:A,C

  • 第9题:

    class One {   public One foo() { return this; }  }  class Two extends One {  public One foo() { return this; }  }  class Three extends Two {   // insert method here  }  Which two methods, inserted individually, correctly complete the Three class?()

    • A、 public void foo() { }
    • B、 public int foo() { return 3; }
    • C、 public Two foo() { return this; }
    • D、 public One foo() { return this; }
    • E、 public Object foo() { return this; }

    正确答案:C,D

  • 第10题:

    多选题
    Given: Which two methods, inserted independently at line 17, correctly complete the Sales class?()
    A

    double getSalesAmount() { return 1230.45; }

    B

    public double getSalesAmount() { return 1230.45; }

    C

    private double getSalesAmount() { return 1230.45; }

    D

    protected double getSalesAmount() { return 1230.45; }


    正确答案: B,A
    解析: 暂无解析

  • 第11题:

    多选题
    Given: Which five methods, inserted independently at line 5, will compile?()
    A

    protected int blipvert(long x) { return 0; }

    B

    protected long blipvert(int x) { return 0; }

    C

    private int blipvert(long x) { return 0; }

    D

    private int blipvert(int x) { return 0; }

    E

    public int blipvert(int x) { return 0; }

    F

    protected long blipvert(long x) { return 0; }

    G

    protected long blipvert(int x, int y) { return 0; }


    正确答案: D,B
    解析: 暂无解析

  • 第12题:

    多选题
    class One {   public One foo() { return this; }  }  class Two extends One {  public One foo() { return this; }  }  class Three extends Two {   // insert method here  }  Which two methods, inserted individually, correctly complete the Three class?()
    A

    public void foo() { }

    B

    public int foo() { return 3; }

    C

    public Two foo() { return this; }

    D

    public One foo() { return this; }

    E

    public Object foo() { return this; }


    正确答案: C,D
    解析: 暂无解析

  • 第13题:

    publicclassBlip{2.protectedintblipvert(intx){return0;}3.}4.classVertextendsBlip{5.//insertcodehere6.}Whichfivemethods,insertedindependentlyatline5,willcompile?()

    A.publicintblipvert(intx){return0;}

    B.privateintblipvert(intx){return0;}

    C.privateintblipvert(longx){return0;}

    D.protectedlongblipvert(intx,inty){return0;}

    E.protectedintblipvert(longx){return0;}

    F.protectedlongblipvert(longx){return0;}

    G.protectedlongblipvert(intx){return0;}


    参考答案:A, C, D, E, F

  • 第14题:

    Given:Whichfivemethods,insertedindependentlyatline5,willcompile?()

    A.protectedintblipvert(longx){return0;}

    B.protectedlongblipvert(intx){return0;}

    C.privateintblipvert(longx){return0;}

    D.privateintblipvert(intx){return0;}

    E.publicintblipvert(intx){return0;}

    F.protectedlongblipvert(longx){return0;}

    G.protectedlongblipvert(intx,inty){return0;}


    参考答案:A, C, E, F, G

  • 第15题:

    All the team members tried their best. We lost the game, _________.

    A. however

    B. although

    C. but

    D. even though


    正确答案:A

  • 第16题:

    Which CLI command allows you to determine how many licenses are currently used on the routerand are further needed by the router?()

    A. show system license key

    B. show system license usage

    C. show system license total

    D. show system license profile


    参考答案:B

  • 第17题:

    下面 ______ 是正确的递归函数,它保证对所有的参数能够结束。

    A.int f(int n){ if(n<1) return 1; else return n*f(n+1); }

    B.int f(int n){ if(n>1) return 1; else return n*f(n-1); }

    C.int f(int n){ if(abs(n)<1) return 1; else return n*f(n/2); }

    D.int f(int n){ if(n>1) return 1; else return n*f(n*2); }


    正确答案:C

  • 第18题:

    Jim went to answer the phone. _______, Harry started to prepare lunce.

    A. However

    B. Nevertheless

    C. Besides

    D. Meanwhile


    正确答案:D

  • 第19题:

    What is the meaning of recycle? ()

    • A、Collect, treat and use again
    • B、Movement in a cycle
    • C、Return to original
    • D、Return goods

    正确答案:A

  • 第20题:

    现有:   1. class Synapse {    2.    protected int gap() { return 7; }    3. }   4.     5. class Creb extends Synapse {    6.   // insert code here   7. }    分别插入到第 6 行,哪三行可以编译?()

    • A、 int gap() { return 7; }
    • B、 public int gap() { return 7; }
    • C、 private int gap(int x) { return 7; }
    • D、 protected Creb gap() { return this; }
    • E、 public int gap() { return Integer.getInteger ("42"); }

    正确答案:B,C,E

  • 第21题:

    1. public class Blip {  2. protected int blipvert(int x) { return 0; }  3. }  4. class Vert extends Blip {  5. // insert code here  6. }  Which five methods, inserted independently at line 5, will compile?()  

    • A、 public int blipvert(int x) { return 0; }
    • B、 private int blipvert(int x) { return 0; }
    • C、 private int blipvert(long x) { return 0; }
    • D、 protected long blipvert(int x, int y) { return 0; }
    • E、 protected int blipvert(long x) { return 0; }
    • F、 protected long blipvert(long x) { return 0; }
    • G、protected long blipvert(int x) { return 0; }

    正确答案:A,C,D,E,F

  • 第22题:

    多选题
    1. class Synapse {   2. protected int gap() { return 7; }   3. }   4.   5. class Creb extends Synapse { 6. // insert code here  7. }  分别插入到第 6 行,哪三行可以编译?()
    A

    int gap() { return 7; }

    B

    public int gap() { return 7; }

    C

    private int gap(int x) { return 7; }

    D

    protected Creb gap() { return this; }

    E

    public int gap() { return Integer.getInteger (42); }


    正确答案: E,D
    解析: 暂无解析

  • 第23题:

    多选题
    1. class BaseClass {  2. private float x = 1.of;  3. protected float getVar() { return x; }  4. }  5. class SubClass extends BaseClass {  6. private float x = 2.Of;  7. // insert code here 8. }   Which two are valid examples of method overriding when inserted at line 7?()
    A

    float getVar() { return x; }

    B

    public float getVar() { return x; }

    C

    public double getVar() { return x; }

    D

    protected float getVar() { return x; }

    E

    public float getVar(float f) { return f; }


    正确答案: E,A
    解析: 暂无解析