更多“单选题以下函数中,不是Object类所有的是()A notifyB valueOfC toStringD wait”相关问题
  • 第1题:

    下列各类函数中,不是类的成员函数的是( )。 A.构造函数B.抽象类C.派生类SX

    下列各类函数中,不是类的成员函数的是( )。

    A.构造函数

    B.抽象类

    C.派生类

    D.以上都不对


    正确答案:C
    C。【解析】构造函数包括默认构造函数和拷贝构造函数等,析构函数和构造函数一样属于类的特殊的成员函数。而友元函数则是为了增加类的访问灵活性而允许其他类的成员函数或全局函数访问类的内部变量或成员函数的一种机制,其缺点是破坏了类的封装性。

  • 第2题:

    ( 16 )下列方法中,不属于 Throwable 类的方法是

    A ) printMessage

    B ) getMessage

    C ) toString

    D ) fillStackTrace


    正确答案:C

  • 第3题:

    以下关于线程的运行,暂停,结束的描述中,错误的是()。

    • A、Thead类的sleep静态函数可以使线程休眠一段时间
    • B、wait函数会使线程处于等待状态,作用与sleep函数相同
    • C、一个线程不需要特别的代码来中止它,当run函数中的代码都执行完了以后,线程就自然中止了
    • D、线程的启动通过线程类(或者其子类)的start函数来实现
    • E、调用stop函数使线程停止

    正确答案:B,E

  • 第4题:

    以下哪些方法在Object类中定义()。

    • A、toString()
    • B、equals(Objecto)
    • C、public static void main(String[]args)
    • D、System.out.println()
    • E、wait()

    正确答案:A,B,E

  • 第5题:

    为了使得System.out.println()输出对象引用的时候得到有意义的信息,我们应该覆盖Object中的哪个方法?() 

    • A、 equals
    • B、 hashCode
    • C、 toString
    • D、 notify

    正确答案:C

  • 第6题:

    Which two can directly cause a thread to stop executing?() 

    • A、 Exiting from a synchronized block.
    • B、 Calling the wait method on an object.
    • C、 Calling the notify method on an object.
    • D、 Calling the notifyAll method on an object.
    • E、 Calling the setPriority method on a thread object.

    正确答案:B,E

  • 第7题:

    Which statement is true?()   

    • A、 If only one thread is blocked in the wait method of an object, and another thread executes the modify on that same object, then the first thread immediately resumes execution.
    • B、 If a thread is blocked in the wait method of an object, and another thread executes the notify method on the same object, it is still possible that the first thread might never resume execution.
    • C、 If a thread is blocked in the wait method of an object, and another thread executes the notify method on the same object, then the first thread definitely resumes execution as a direct and sole consequence of the notify call.
    • D、 If two threads are blocked in the wait method of one object, and another thread executes the notify method on the same object, then the first thread that executed the wait call first definitely resumes execution as a direct and sole consequence of the notify call.

    正确答案:B

  • 第8题:

    单选题
    为了使得System.out.println()输出对象引用的时候得到有意义的信息,我们应该覆盖Object中的哪个方法?()
    A

     equals

    B

     hashCode

    C

     toString

    D

     notify


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

  • 第9题:

    多选题
    以下关于Object类的描述中,错误的是()。
    A

    Object类提供了wait,notify,notifyAll等函数用于线程间同步

    B

    Object类提供了clone,compare,delete,add,insert等函数用于对对象进行操作

    C

    Object类是所有自定义类的直接或间接父类,但不是系统类的父类

    D

    Object类定义了一些每个类都应该有的基本的成员变量和成员函数

    E

    Object类是其它一切类的直接或间接父类


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

  • 第10题:

    单选题
    Which statement is true?()
    A

     If only one thread is blocked in the wait method of an object, and another thread executes the modify on that same object, then the first thread immediately resumes execution.

    B

     If a thread is blocked in the wait method of an object, and another thread executes the notify method on the same object, it is still possible that the first thread might never resume execution.

    C

     If a thread is blocked in the wait method of an object, and another thread executes the notify method on the same object, then the first thread definitely resumes execution as a direct and sole consequence of the notify call.

    D

     If two threads are blocked in the wait method of one object, and another thread executes the notify method on the same object, then the first thread that executed the wait call first definitely resumes execution as a direct and sole consequence of the notify call.


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

  • 第11题:

    多选题
    关于object类,以下描述中正确的有()
    A

    object类中定义了一些重要的成员函数和变量,以方便JAVA类的使用

    B

    object类是所有其他JAVA类的直接或间接父类

    C

    object类是一个非常特殊的“虚拟”类,也就是说,你只能丛object类中派生出其他类,但不能创建一个object类的对象。

    D

    如果一个类已经有了父类,那么这个类同时继承了object类,也就是说,这时候这个类实际上有2个父类

    E

    由于JAVA中的类是单继承的,因此所有的类以object类为根形成了一棵继承树


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

  • 第12题:

    单选题
    在下列选项中,()不是类的成员函数。
    A

    构造函数

    B

    析构函数

    C

    友元函数

    D

    复制构造函数


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

  • 第13题:

    下列方法中,不属于类Strin9的方法是( )。

    A.toLowerCase

    B.valueOf

    C.charAt

    D.append


    正确答案:D
    D。【解析】String的方法中,toLowerCase方法是转换成小写,valueof方法是获得相应数值,eharAt方法是提取字符串中指定位置的字符。append是StringBuffer的方法。

  • 第14题:

    java中下面哪些是Object类的方法()。

    • A、notify()
    • B、notifyAll()
    • C、sleep
    • D、wait()

    正确答案:A,B,D

  • 第15题:

    以下关于Object类的描述中,错误的是()。

    • A、Object类提供了wait,notify,notifyAll等函数用于线程间同步
    • B、Object类提供了clone,compare,delete,add,insert等函数用于对对象进行操作
    • C、Object类是所有自定义类的直接或间接父类,但不是系统类的父类
    • D、Object类定义了一些每个类都应该有的基本的成员变量和成员函数
    • E、Object类是其它一切类的直接或间接父类

    正确答案:B,C

  • 第16题:

    What happens when thread X executes a wait() method on object A, without owning object A’s lock?()  

    • A、 Compilation fails.
    • B、 An exception is thrown.
    • C、 The wait() method has no effect.
    • D、 Thread X receives the lock immediately.
    • E、 Object A moves the thread to the wait pool.

    正确答案:B

  • 第17题:

    以下函数中,不是Object类所有的是() 

    • A、notify
    • B、valueOf
    • C、toString
    • D、wait

    正确答案:B

  • 第18题:

    What can cause a thread to become non-runnable?()

    • A、 Exiting from a synchronized block.
    • B、 Calling the wait method on an object.
    • C、 Calling the notify method on an object.
    • D、 Calling the notifyAll method on an object.

    正确答案:B

  • 第19题:

    关于object类,以下描述中正确的有()

    • A、object类中定义了一些重要的成员函数和变量,以方便JAVA类的使用
    • B、object类是所有其他JAVA类的直接或间接父类
    • C、object类是一个非常特殊的“虚拟”类,也就是说,你只能丛object类中派生出其他类,但不能创建一个object类的对象。
    • D、如果一个类已经有了父类,那么这个类同时继承了object类,也就是说,这时候这个类实际上有2个父类
    • E、由于JAVA中的类是单继承的,因此所有的类以object类为根形成了一棵继承树

    正确答案:A,B,E

  • 第20题:

    多选题
    Which two can directly cause a thread to stop executing?()
    A

    Exiting from a synchronized block.

    B

    Calling the wait method on an object.

    C

    Calling the notify method on an object.

    D

    Calling the notifyAll method on an object.

    E

    Calling the setPriority method on a thread object.


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

  • 第21题:

    单选题
    What can cause a thread to become non-runnable?()
    A

     Exiting from a synchronized block.

    B

     Calling the wait method on an object.

    C

     Calling the notify method on an object.

    D

     Calling the notifyAll method on an object.


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

  • 第22题:

    单选题
    以下函数中,不是Object类所有的是()
    A

    notify

    B

    valueOf

    C

    toString

    D

    wait


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

  • 第23题:

    单选题
    What happens when thread X executes a wait() method on object A, without owning object A’s lock?()
    A

     Compilation fails.

    B

     An exception is thrown.

    C

     The wait() method has no effect.

    D

     Thread X receives the lock immediately.

    E

     Object A moves the thread to the wait pool.


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

  • 第24题:

    单选题
    在JAVA中,Object类是所有类的父亲,用户自定义类默认扩展自Object类,下列选项中的()方法不属于Object类的方法。
    A

    equals(Object obj)

    B

    getClass()

    C

    toString()

    D

    trim()


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