Number Of Page View:100,000+/Months
LOGIN |New User


What is an Object and how do you allocate memory to it?
An object is a runtime entity. It is an instance of the class and have its own state, made up of values assigned to all variables of its class collectively. An object will hava access to all the behaviours(methods) of its class.

The object can be allocated memory using the "new" keyword. For Example : 
//class declaration
class CrateObject{
//Object creation
CreateObject o = new CreateObject();