1.

Which keyword among the following can be used to declare an array of objects in java?(a) new(b) create(c) allocate(d) arrThis question was posed to me during a job interview.My enquiry is from Overloading Member Functions in section Member Functions & its Types of Object Oriented Programming

Answer»

The correct answer is (a) new

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.



Discussion

No Comment Found

Related InterviewSolutions