多选题Which of the following statements about declaration are true?()ADeclaration of primitive types such as boolean, byte and so on does not allocate memory space for the variable.BDeclaration of primitive types such as boolean, byte and so on allocates mem

题目
多选题
Which of the following statements about declaration are true?()
A

Declaration of primitive types such as boolean, byte and so on does not allocate memory space for the variable.

B

Declaration of primitive types such as boolean, byte and so on allocates memory space for the variable.

C

Declaration of nonprimitive types such as String, Vector and so on does not allocate memory space for the object.

D

Declaration of nonprimitive types such as String, Vector ans so on allocates memory space for the object.


相似考题
更多“多选题Which of the following statements about declaration are true?()ADeclaration of primitive types such as boolean, byte and so on does not allocate memory space for the variable.BDeclaration of primitive types such as boolean, byte and so on allocates mem”相关问题
  • 第1题:

    Which of the following memory types is unique in that it generates so much heat it requires that the memory modules are covered in heat sinks?()

    A.RAMBUS

    B.DDR3

    C.DDR

    D.SDRAM


    参考答案:A

  • 第2题:

    Which of the following are all valid DB2 data types?()

    A.LONG VARCHAR, SMALLINT, NUMBER, BLOB

    B.DECIMAL, DATE, DBCLOB, INTERVAL

    C.NUMERIC, TIMESTAMP, BYTE, FLOAT

    D.NUM, TIME, XML, DOUBLE


    参考答案:D

  • 第3题:

    以下代码中变量result的可能类型有哪些?byte b = 11;short s = 13;result = b * ++s;

    A.byte, short, int, long, float, double

    B.boolean, byte, short, char, int, long, float, double

    C.byte, short, char, int, long, float, double

    D.byte, short, char

    E.int, long, float, double


    正确答案:E
     

  • 第4题:

    Which statements concerning casting and conversion are true?()  

    • A、Conversion from int to long does not need a cast.
    • B、Conversion from byte to short does not need a cast.
    • C、Conversion from float to long does not need a cast.
    • D、Conversion from short to char does not need a cast.
    • E、Conversion from boolean to int using a cast is not possible.

    正确答案:A,B,E

  • 第5题:

    在Java中,字节数据类型的关键字和默认值是()

    • A、byte和0
    • B、byte和1
    • C、boolean和true
    • D、boolean和false

    正确答案:A

  • 第6题:

    Which of the following memory types has 184 pins?()

    • A、DDR3
    • B、DDR
    • C、SDRAM
    • D、DDR2

    正确答案:B

  • 第7题:

    Which of the following are all valid DB2 data types?()

    • A、LONG VARCHAR, SMALLINT, NUMBER, BLOB
    • B、DECIMAL, DATE, DBCLOB, INTERVAL
    • C、NUMERIC, TIMESTAMP, BYTE, FLOAT
    • D、NUM, TIME, XML, DOUBLE

    正确答案:D

  • 第8题:

    Which of the following statements about declaration are true?()         

    • A、 Declaration of primitive types such as boolean, byte and so on does not allocate memory space for the variable.
    • B、 Declaration of primitive types such as boolean, byte and so on allocates memory space for the variable.
    • C、 Declaration of nonprimitive types such as String, Vector and so on does not allocate memory space for the object.
    • D、 Declaration of nonprimitive types such as String, Vector ans so on allocates memory space for the object.

    正确答案:A,D

  • 第9题:

    What two statements are true about Oracle Enterprise Manager’s Java Diagnostic tool, which makes the tool suitable for production server diagnostics ?()

    • A、 virtually zero overhead for application running in the JVM 
    • B、 no stalling of running JVM when taking a heap dump for memory analysis 
    • C、 no need of modification, changes, or instrumentation of the application since is uses Network Protocol Analysis (NPA technology)
    • D、 provides Byte Code Instrumentation for Java

    正确答案:A,B

  • 第10题:

    单选题
    下面均为java关键字的一组是()
    A

    boolean ,byte,long,assert

    B

    byte,long,true,goto

    C

    goto,boolean,byte,null

    D

    boolean,long,false,auto


    正确答案: B
    解析: true,null和false都是字面量

  • 第11题:

    多选题
    A JavaBeans component has the following field:  11. private boolean enabled;  Which two pairs of method declarations follow the JavaBeans standard for accessing this field?()
    A

    public void setEnabled( boolean enabled) public boolean getEnabled()

    B

    public void setEnabled( boolean enabled) public void isEnabled()

    C

    public void setEnabled( boolean enabled) public boolean isEnabled()

    D

    public boolean setEnabled( boolean enabled) public boolean getEnabled()


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

  • 第12题:

    多选题
    What two statements are true about Oracle Enterprise Manager’s Java Diagnostic tool, which makes the tool suitable for production server diagnostics ?()
    A

    virtually zero overhead for application running in the JVM

    B

    no stalling of running JVM when taking a heap dump for memory analysis

    C

    no need of modification, changes, or instrumentation of the application since is uses Network Protocol Analysis (NPA technology)

    D

    provides Byte Code Instrumentation for Java


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

  • 第13题:

    Which of the following memory types has 184 pins?()

    A.DDR3

    B.DDR

    C.SDRAM

    D.DDR2


    参考答案:B

  • 第14题:

    下面均为Java关键字的一组是()

    A、boolean,byte,long,true

    B、byte, long,true,goto

    C、goto ,Boolean,byte,true

    D、bool, long,true,auto


    答案:A

  • 第15题:

    下面均为java关键字的一组是()

    • A、boolean ,byte,long,assert
    • B、byte,long,true,goto
    • C、goto,boolean,byte,null
    • D、boolean,long,false,auto

    正确答案:A

  • 第16题:

    Which are not Java primitive types?()    

    • A、 short
    • B、 Boolean
    • C、 unit
    • D、 float

    正确答案:B,C

  • 第17题:

    Which of the following network types is being described when computers are connected so thatdata flows from one computer to the other by traveling through each computer in the network?()

    • A、Star
    • B、Hybrid
    • C、Mesh
    • D、Ring

    正确答案:D

  • 第18题:

    Which of the following memory types is located in the processor chip?()

    • A、 EDO
    • B、 L1
    • C、 xD
    • D、 DDR

    正确答案:B

  • 第19题:

    Given the following code fragment:     public void create() {     Vector myVect;     myVect = new Vector();      }  Which of the following statements are true?() 

    • A、 The declaration on line 2 does not allocate memory space for the variable myVect.
    • B、 The declaration on line 2 allocates memory space for a reference to a Vector object.
    • C、 The statement on line 2 creates an object of class Vector.
    • D、 The statement on line 3 creates an object of class Vector.
    • E、 The statement on line 3 allocates memory space for an object of class Vector.

    正确答案:A,D,E

  • 第20题:

    Which three are true about the large pool for an Oracle database instance that supports shared serverconnections?()

    • A、Allocates memory for RMAN backup and restore operations
    • B、Allocates memory for shared and private SQL areas
    • C、Contains a cursor area for storing runtime information about cursors
    • D、Contains stack space
    • E、Contains a hash area performing hash joins of tables

    正确答案:A,B,C

  • 第21题:

    多选题
    Which statements concerning casting and conversion are true?()
    A

    Conversion from int to long does not need a cast.

    B

    Conversion from byte to short does not need a cast.

    C

    Conversion from float to long does not need a cast.

    D

    Conversion from short to char does not need a cast.

    E

    Conversion from boolean to int using a cast is not possible.


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

  • 第22题:

    多选题
    Which of the following statements about declaration are true?()
    A

    Declaration of primitive types such as boolean, byte and so on does not allocate memory space for the variable.

    B

    Declaration of primitive types such as boolean, byte and so on allocates memory space for the variable.

    C

    Declaration of nonprimitive types such as String, Vector and so on does not allocate memory space for the object.

    D

    Declaration of nonprimitive types such as String, Vector ans so on allocates memory space for the object.


    正确答案: A,C
    解析: 对原始数据类型的变量的声明将为之分配内存并赋予一个缺省值,参见23题的叙述,而非原始数据类型的变量必须用new Xxxx()分配内存及初始化。但是严格来讲此题的答案有待确定,因为只有原始类型的实例变量和类变量的声明在类对象被创建/类被加载时完成内存的自动分配,而原始类型的局部变量必须显式初始化,从这点来看原始类型的局部变量没有被自动分配内存,SL275中只提出了非原始数据类型的变量必须使用new Xxxx()完成内存的分配而没有指出原始数据类型的变量是否在声明时即自动进行内存分配,而从局部变量不能在显式初始化前使用这点来看在声明时没有进行内存分配。因此答案a的正确性还有待官方的确定。

  • 第23题:

    多选题
    Given the following code fragment:     public void create() {     Vector myVect;     myVect = new Vector();      }  Which of the following statements are true?()
    A

    The declaration on line 2 does not allocate memory space for the variable myVect.

    B

    The declaration on line 2 allocates memory space for a reference to a Vector object.

    C

    The statement on line 2 creates an object of class Vector.

    D

    The statement on line 3 creates an object of class Vector.

    E

    The statement on line 3 allocates memory space for an object of class Vector.


    正确答案: C,D
    解析: SL-275中指出:要为一个新对象分配空间必须执行new Xxx()调用,new调用执行以下的操作: 
    1.为新对象分配空间并将其成员初始化为0或者null。 
    2.执行类体中的初始化。(例如在类中有一个成员声明int a=10;在第一步后a=0 ,执行到第二步后a=10)    
    3.执行构造函数。 
    4.变量被分配为一个到内存堆中的新对象的引用。

  • 第24题:

    多选题
    Which are not Java primitive types?()
    A

    short

    B

    Boolean

    C

    unit

    D

    float


    正确答案: C,D
    解析: Java的原始数据类型一共就八个,分别是:byte,short,int,long,boolean,char,float,double。注意这些是大小写敏感的,而Boolean是booelan的封装类(wrapper class)。