InterviewSolution
Saved Bookmarks
| 1. |
Which keyword among the following can be used to declare an array of objects in java?(a) new(b) create(c) allocate(d) arrThe question was posed to me by my school principal while I was bunking the class.My question is from Memory Allocation of Object in division Object of Object Oriented Programming |
|
Answer» CORRECT choice is (a) new For explanation: The keyword new can be used to declare an array of objects in java. The syntax MUST be specified with an object pointer which is ASSIGNED with a memory space containing the required number of object space. Even INITIALIZATION can be done directly. |
|