MCQ PracticeSingle Best AnswerTopic: Array in Java
Q
Which of these operators is used to allocate memory to array variable in Java?
Question ID
#4349
Subchapter
Array in Java
Action
Choose one option below
Choose Your Answer
Click an option to check whether your answer is correct.
A
malloc
✔✖
B
alloc
✔✖
C
new
✔✖
D
new malloc ✔✖
C
Correct Answer: C
Explanation
Explanation: Operator new allocates a block of memory specified by the size of an array, and gives the reference of memory allocated to the array variable.