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

What is the purpose of master page?

523


What is the difference between a page theme and a global theme?

546


Explain the Order of events in an asp.net page?

606


What is the maximum amount of memory any single process on windows can address?

538


is there any third party tools are using in .net technologies? what are there ? give me the brief introduction?

1956






What is repository pattern in mvc.net? : asp.net mvc

530


Can we override the enablepartialrendering property of the scriptmanager class?

646


What is meant by server side scripting?

525


What is application variable?

523


What is the size of Get method and how much data it can store?

577


Take a Large textbox allow to type any data. Task 1:display the count of vowels in a lable on key press event of the textbox Task 2:dispaly count of dates in a lable when dates in following foramats:dd/mm/yy , mm/dd/yy , yy/mm/dd. Task3:compare 2 dates and display both are same or not which dates are in dd/mm/yy and mm/dd/yy farmats.

2597


Why Unload event of MasterPage Calls first in ASP.net ?

588


What is ASLM?

686


What type of code, client-side or server-side, is found in a code-behind file of a Web page?

587


How does session authentication work?

515