1.

Initializers __________________(a) Are used for specifying arrays(b) Are used to defined multidimensional arrays(c) Can’t be specified for arrays(d) Can’t be specified for any dataThis question was addressed to me during an interview.I'm obligated to ask this question of New Operator topic in section Memory Allocation & Scope of Variable of Object Oriented Programming

Answer»

Correct answer is (C) Can’t be SPECIFIED for ARRAYS

The EXPLANATION: The initializers can’t be specified for arrays. The initializers can create arrays of object if and only if the class has a default constructor. That is a zero argument constructor so that it can be called without any argument.



Discussion

No Comment Found

Related InterviewSolutions