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

Can a dictionary have the same key?

1021


What do you mean by thread safe in c#?

930


What is file extension of webservices?

1087


What is Global Assembly Cache (GAC) and what is the purpose of it? (How to make an assembly to public? Steps) How more than one version of an assembly can keep in same place?

1097


What is the difference between hashtable and dictionary in c#?

970


What is wpf application in c#?

915


Which is better javascript or c#?

962


Explain About Virtual functions and their use.

1075


How we can create an array with non-default values?

1000


How to parse a date time string?

1067


In .NET how can you solve the DLL Hell problem?

1210


What is array and its types in c#?

981


What is a generic method?

1033


What is boolean method?

994


What is the difference between field and property in c#?

989