单选题类Account中方法声明正确的是哪一项?()A class Account{  deposit();  }B class Account{  void deposit(); }C class Account{  void deposit{}  }D class Account{  void deposit(){}  }

题目
单选题
类Account中方法声明正确的是哪一项?()
A

class Account{  deposit();  }

B

class Account{  void deposit(); }

C

class Account{  void deposit{}  }

D

class Account{  void deposit(){}  }


相似考题
参考答案和解析
正确答案: B
解析: 暂无解析
更多“单选题类Account中方法声明正确的是哪一项?()A class Account{  deposit();  }B class Account{  void deposit(); }C class Account{  void deposit{}  }D class Account{  void deposit(){}  }”相关问题
  • 第1题:

    听力原文: If you want to invest money at short term, you've got several possibilities: first, a current account. This gives you the possibility of having all your money at your immediate disposal. It also entitles you to a cheque-book. Second, you've got a deposit account, which usually pays about 3. 5% interest, less tax. In that respect, a deposit account's a better investment than a current account. However, though you are entitled to a cheque-book, you can only withdraw up to a certain sum each month. For large amounts, you must give the bank a few months' notice. Finally, you have certificates of deposit. These pay in the order of 6.5% interest.

    28. How many possibilities are there for a customer to invest money at short term?

    29.With what kind of deposit can a customer NOT use a cheque-book?

    30.What is the interest rate for maintaining a deposit account?

    (28)

    A.2.

    B.5.

    C.4

    D.3


    正确答案:D
    解析:综合整篇录音原文,它提到first,...Second,...Finally,...因此推断出客户可采用三种方法进行短期投资。

  • 第2题:

    What does "deposit account" mean in Chinese?

    A、活期存款账户

    B、定期存款账户

    C、银行账户

    D、预算账户


    正确答案:B

  • 第3题:

    From the DX WebUI Dashboard, which steps are used for creating a new admin user? ()

    A. Click Admin > Users. Enter username, password, role, account status, and email.

    B. Click Admin > Users. Enter username, password, role, account status, and user class.

    C. Click Users > Manage Users. Enter username, password, role, account status, and user class.

    D. Click Users > Manage Users. Enter username, password, ActiveDirectory domain, account status, and role.


    参考答案:B

  • 第4题:

    下列关于Test类的定义中,正确的是( )。

    A.class Test implements Runnable{ public void run{} Dublic void someMethod[]{} }

    B.class Test implements Runnable( puIblic void run; }

    C.class Test implements Runnable( Dublic void someMethod[]; }

    D.class Test implements Runnable( public void someMethod{} }


    正确答案:A
    A。【解析】java中实现多线程的方法之一就是实现Runnable接口中的run方法,把实现Runnable接口的子类对象传递给Thread类的构造函数。

  • 第5题:

    如下所示的UML序列图中,(请作答此空 )表示返回消息,Account类必须实现的方法有( )。

    A.tansID
    B.balance
    C.withdraw
    D.deposit

    答案:B
    解析:
    在URL序列图中,调用消息用带实心箭头的实线表示,返回消息用带箭头的虚线表示,图中的编号为1、2、3、5的消息均为调用消息,只有编号为3的消息为返回消息由题目可知,Fund Transaction Manager要调用类Ac-count的checkBalance()、withdraw()和deposit()方法,类Account需要实现这3个方法

  • 第6题:

    下列类Account的构造方法中,声明正确的是?()

    • A、Account(Stringname){)
    • B、Account(Stringname)
    • C、Account(name)()
    • D、NewAccount(Stringname){)

    正确答案:A

  • 第7题:

    class Account {   private int balance;   public void setBalance(int b) { balance = b; }  public int getBalance() { return balance; }   public void clearBalance() { balance = 0; }   }   哪一个改变可以使 Account 类线程安全?() 

    • A、在第2行加 synchronized 修饰符。
    • B、在第3行加 synchronized 修饰符。
    • C、在第3行、第4行和第6行加 synchronized 修饰符。
    • D、在第4行、第6行和第8行加 synchronized 修饰符。

    正确答案:D

  • 第8题:

    下面哪一个是正确的类的声明?()

    • A、public void HH{…}
    • B、public class Move(){…}
    • C、public class void number{}
    • D、public class Car{…}

    正确答案:D

  • 第9题:

    我们定义一个Account类来描述银行账户,银行账户有账户名、金额等属性特征,同时有存款、取款等行为特征,下述代码适合描述的是哪项?()     

    • A、class  Accountf        String name;//账户     S    tring amount;  //金额        Account (String name)(    )   void deposit (double mount){  //存款     )   void withdraw (double mount){  //取款     }     )
    • B、class  Accountf       String name;//账户d  ouole amount;  //金额       Account(double amount){   }  void deposit (double mount){  //存款     )  void withdraw (double mount){  //取款     )     )
    • C、class  Accountf        String name;//账户   double amount;  //金额       Account (String name){}    void deposit (double mount){//存款     )      void withdraw (double mount){  //取款     )     )
    • D、class Accountf        String name;//账户        double amount;//金额      Account (String name){}        void deposit(){//存款     )   void withdraw(){//取款 )     )

    正确答案:C

  • 第10题:

    单选题
    下面哪一个是正确的类的声明?()
    A

    public void HH{…}

    B

    public class Move(){…}

    C

    public class void number{}

    D

    public class Car{…}


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

  • 第11题:

    单选题
    From the DX WebUI Dashboard, which steps are used for creating a new admin user? ()
    A

    Click Admin > Users. Enter username, password, role, account status, and email.

    B

    Click Admin > Users. Enter username, password, role, account status, and user class.

    C

    Click Users > Manage Users. Enter username, password, role, account status, and user class.

    D

    Click Users > Manage Users. Enter username, password, ActiveDirectory domain, account status, and role.


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

  • 第12题:

    单选题
    class Account {   private int balance;   public void setBalance(int b) { balance = b; }  public int getBalance() { return balance; }   public void clearBalance() { balance = 0; }   }   哪一个改变可以使 Account 类线程安全?()
    A

    在第2行加 synchronized 修饰符。

    B

    在第3行加 synchronized 修饰符。

    C

    在第3行、第4行和第6行加 synchronized 修饰符。

    D

    在第4行、第6行和第8行加 synchronized 修饰符。


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

  • 第13题:

    听力原文: When a savings account is opened in a bank, the depositor must sign a deposit agreement. By signing agreement, the depositor agrees to abide by the rules and regulations of the bank. At this time, a passbook may be given to the depositor. This is a small book in which the bank teller enters the date and amount of each deposit or withdrawal and initials the entry. The passbook is to be presented at the bank or mailed to the bank along with a deposit or withdrawal slip each time money is deposited or withdrawn from the account. An alternative practice for depositing or withdrawing money from a savings account is to give the depositor a small register for recording deposits and withdrawals and a pad of deposit withdrawal rotors. This procedure eliminates the use of the passbook.

    24. What is the purpose of signing a deposit agreement?

    25.What does a depositor do with a passbook?

    26.What is the aim of a small register and a pad of deposit withdrawal forms?

    (24)

    A.To follow the bank's rules and regulations.

    B.To have the right to make full use of the bank's facilities.

    C.To open an account in the bank.

    D.To protect the depositor's interest.


    正确答案:A
    解析:录音原文中提到By signing agreement,the depositor…rules and regulations of the bank.通过签订存储协议,存款人会遵守银行的规则。

  • 第14题:

    对话理解

    听力原文:W: Since I have some spare cash in my account, I would like to open a time deposit account here. Can you give me some information please?

    M: With pleasure. We have many kinds of time deposit accounts: 1 month, 3 month, 6 month and 1 year.

    Q: What is the possible relationship between the two speakers?

    (11)

    A.Customs officer and travelers.

    B.Employer and employee.

    C.Business associates.

    D.Bank clerk and customer.


    正确答案:D
    解析:根据对话,女士是想开立一个定期存款账户,并请求对方提供相关信息,男士则介绍了几种定期存款账户类型,由此可推知两者为银行职员与客户之间的关系。

  • 第15题:

    类class one 在声明func 成员函数时发生错误,出错原因是【 】。

    Class one

    {

    private:

    int a;

    public:

    void func(two& )

    };

    class two

    {

    private:

    int b;

    friend void one: :func(two & );

    };

    void one: : func(two& r)

    a=r.b;

    }


    正确答案:class one前没有声明语句class two;
    class one前没有声明语句class two; 解析:当一个类作为另一个类的成员函数、成员函数的参数或其他情况的时候,要确保编译器能正确解析。由于在class one之前没有关于class two的任何说明,而在class one的func函数中却用了class two类的参数。因此是错误的。

  • 第16题:

    如下所示的UML序列图中,( )表示返回消息,Account类必须实现的方法有(请作答此空)。

    A.start0
    B.checkBalance()和withdraw()
    C.deposit0
    D.checkBalance()、withdraw()和deposit()

    答案:D
    解析:
    在URL序列图中,调用消息用带实心箭头的实线表示,返回消息用带箭头的虚线表示,图中的编号为1、2、3、5的消息均为调用消息,只有编号为3的消息为返回消息由题目可知,Fund Transaction Manager要调用类Ac-count的checkBalance()、withdraw()和deposit()方法,类Account需要实现这3个方法

  • 第17题:

    如下所示的UML序列图中,(42)表示返回消息,Account类必须实现的方法有(43)。


    A. tansID
    B. balance
    C. withdraw
    D. deposit

    答案:B
    解析:
    在URL序列图中,调用消息用带实心箭头的实线表示,返回消息用带箭头的虚线表示,图中的编号为1、2、3、5的消息均为调用消息,只有编号为3的消息为返回消息。由题目可知,Fund Transaction Manager要调用类Ac-count的checkBalance()、withdraw()和deposit()方法,类Account需要实现这3个方法。

  • 第18题:

    类Account中字段声明正确的是?()    

    • A、class Account{  name;  amount;  }
    • B、class Account{  String name;  double amount;  }
    • C、class Account{  String name=1.0;  double amount=”Mike”;  }
    • D、class Account{  String name=”Mike”,double amount=1000.0;  }

    正确答案:B

  • 第19题:

    下列类Account的构造方法中,声明正确的是?()    

    • A、Account (String name)()
    • B、Account (String  name)
    • C、Account (name)()
    • D、NewAccount (String name)()

    正确答案:A

  • 第20题:

    类Account中方法声明正确的是哪一项?()  

    • A、class Account{  deposit();  }
    • B、class Account{  void deposit(); }
    • C、class Account{  void deposit{}  }
    • D、class Account{  void deposit(){}  }

    正确答案:D

  • 第21题:

    From the DX WebUI Dashboard, which steps are used for creating a new admin user? ()

    • A、Click Admin > Users. Enter username, password, role, account status, and email.
    • B、Click Admin > Users. Enter username, password, role, account status, and user class.
    • C、Click Users > Manage Users. Enter username, password, role, account status, and user class.
    • D、Click Users > Manage Users. Enter username, password, ActiveDirectory domain, account status, and role.

    正确答案:B

  • 第22题:

    单选题
    public class Parent{   public void change(int x){}  }   public class Child extends Parent{   //覆盖父类change方法   }   下列哪个声明是正确的覆盖了父类的change方法?()
    A

     protected void change(int x){}

    B

     public void change(int x, int y){}

    C

     public void change(String s){}

    D

     public void change(int x){}


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

  • 第23题:

    单选题
    我们定义一个Account类来描述银行账户,银行账户有账户名、金额等属性特征,同时有存款、取款等行为特征,下述代码适合描述的是哪项?()
    A

    class  Accountf        String name;//账户     S    tring amount;  //金额        Account (String name)(    )   void deposit (double mount){  //存款     )   void withdraw (double mount){  //取款     }     )

    B

    class  Accountf       String name;//账户d  ouole amount;  //金额       Account(double amount){   }  void deposit (double mount){  //存款     )  void withdraw (double mount){  //取款     )     )

    C

    class  Accountf        String name;//账户   double amount;  //金额       Account (String name){}    void deposit (double mount){//存款     )      void withdraw (double mount){  //取款     )     )

    D

    class Accountf        String name;//账户        double amount;//金额      Account (String name){}        void deposit(){//存款     )   void withdraw(){//取款 )     )


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