Which of these operators is used to allocate memory to array variable in Java? a)new
b)new malloc
c)alloc
d)malloc
e)None of these
Answers
Answered by
12
Answer:
(a) new is the correct answer
I hope it helps you
please mark as brainliest
Answered by
1
Operator new is used to allocate memory to array variables in Java (Option A).
- Operator new allots memory that is identified and defined the size of the array. It also provides the reference of memory allotted to the array variable.
- In Java, the working of the arrays is different from that of in C or C++. The arrays are allotted dynamically in Java.
- The memory is initialized and then it is returned along with the newly allocated address with the help of the new operator.
Similar questions