adplus-dvertising
frame-decoration

Question

An array declaration in Java without initialization ___ memory.

a.

Does not allocate

b.

Allocates memory

c.

Depends on Compiler

d.

None of the above

Posted under Java Programming

Answer: (a).Does not allocate

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. An array declaration in Java without initialization ___ memory.

Similar Questions

Discover Related MCQs

Q. In Java language, an array index starts with ___.

Q. Which are the special symbols used to declare an array in Java?

Q. Which are the special symbols used to initialize an array at the time of the declaration itself?

Q. It is possible to skip initializing some elements of the array during Shorthand Initialization. (TRUE / FALSE)

Q. In Java, an array can be declared without initialization without mentioning the size. (TRUE / FALSE)

Q. Which is the correct way of knowing Array Size in Java?

Q. We should not specify the array size if declaration and initialization are done at the same time. (TRUE / FALSE)

Q. If an index of an element is N, what is its actual position in the array?

Q. An array in Java can be declared only of some predefined types. (TRUE/FALSE)

Q. The name of an array variable or identifier can start with ___.

Q. Shorthand array initialization in Java needs the keyword "new" to allocate memory to the array and elements. State TRUE or FALSE.

Q. Lazy initialization of array requires the keyword "new" to allocate memory to the array and its elements. State TRUE or FALSE.

Q. What is the default value of an element of Object type array?

Q. What is the default value of byte, short, int or long data type elements of an array in Java?

Q. What is the default value of float or double data type elements of an array in Java?

Q. What is the default value of a char data type elements of an array in Java?

Q. What is the default value of boolean data type elements of an array in Java?

Q. Allocating memory with the keyword "new" causes the array elements to carry default values. State TRUE or FALSE.

Q. An array of arrays in Java is called ___ array.

Q. A multidimensional array contains elements of the same data-type in all rows and columns. State TRUE or FALSE.