suppose we have two object;obj1 and obj2
can we assign obj2 to one1;
and if yes; then after assigning suppose we delete obj2
then obj1 will retain obj2 value or not.

Answer Posted / masthan

see this example
parentclass obj1=new parentclass();
childclass obj2=obj1;//assign object to the reference of
childclass.here both obj1 and obj2 refer same memory
location.
obj1=null;//here obj1 losts the memory
console.write(obj2);//it refers same memory location

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where are session variables stored?

704


I have an excel file with data, i am importing this excel file data into Sqlserver 2005 database. while importing i am getting wrong data(ie, special characters) in one column(description column), upto some limit the data in that column is coming fine,after that data is coming like below. The "Walter" leather storage bench is one of our most popular styles. The top with the tufting and double stitching finish a very impressive piece. The size is perfect in front of beds and the storage adds another functional bonus. Open it up and sneak al���Ƴ�Â��ƴ�Ã��ƶ�Å�� al���Ƴ�Â��ƴ�Ã��ƶ�Å�� Is there anywhy to resolve this? (I am using recordset in coding for developing import process.) please help me soon.

1655


How to use push notification?

783


What are the versions of garbage collection?

1642


Explain the code Access Security (CAS) in .net Framework?

955


What is globalization and localization in asp net?

684


Explain what is an abstract class?

777


Define managed code and managed data in .net?

689


What does session_start () do?

813


what is DLL Hell and how it is solved in .NET? please explain clearly??

2088


What are the elements of a website?

711


How can we call webservices in Banking Applications? and where we are using it?

1720


What is the request flow used for asp.net mvc framework? : asp.net mvc

699


What is enableviewstate?

718


What is the biggest disadvantage of “Other Return Types” in Web API?

1138