Wednesday, June 4, 2014

What is the role of the "new" operator in the creation of an object ?

What is the role of the "new" operator in the creation of an object ?

Ans: When u use the "new" operator for creating the object of the class it will internally perform the following:
   -Reads the Classes
   -Calls the Constructors
   -Allocates the memory required for the object

-What is meant by reading the class ?

Ans: Reading the class in the sense it will recongnize each and every member which was defined under the class.

No comments:

Post a Comment

Thank you for visiting my blog

Python -3

  Lists It is used to store Collection of data. Lists are created using square brackets: List Items Order cannot be changed. It can have dup...