Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

I have a class declared as below
public class a
{
public void add()
{}
}



What is the diference between
a a1 =new a;
and simply
a a1;

Answer Posted / pritam kumar

in a a1
It only declares an object a1 of class a but no memory is
allocted to execute the main method

where as in a a1 = new a

It declares an object and also intiate it using the new key
word.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is string pool in c#?

1004


How to use session under class file of APP_Code folder?

1020


Why do we need serialization?

910


Explain the Usage of web.config

1006


What is the CTS, and how does it relate to the CLS?

1000


Explain the process of abstraction with an example?

946


Can you instantiate an abstract class c#?

904


What is sqladapter c#?

958


What's the difference between the debug class and trace class? Documentation looks the same.

1093


Explain the difference between passing parameters by value and passing parameters by reference with an example?

931


How Is The Dll Hell Problem Solved In .net?

1025


What is deadly diamond problem?

977


What is private virtual in C#?

1013


Can we set image Source dynamically using C# in WPF application?

1073


Difference between value and reference type.

920