Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
assigning object from other object
if i want to do the assignment
object1 = object2
does it copy to object1 a pointer to object2 or the entire object2?
it matters to me because of:
1)space allocation usage
2)if i change value in property in object 1 will it change also in object2?
3)do i need to use new first for object1 before the assignment?