Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
4
Reply
what happens when we create an object
arun prasad
Apr 27 2010 1:48 AM
4.6k
Reply
Hello everyone,
I know what happens when we give a syntax like,
class_name obj = new class_name();
The above statement will create an instance with the name obj for the class named class_name. Here the constructor of the class will be automatically called and it will return the total number of space required for that instance and that much space will be created by new operator.
But what happens when i give like,
int x = new int();
and also, what is the difference between the above one and
int x = 10;
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
How Do I: Close a SqlDataReader?
Socket