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
What are the collection types can be used in c#?
is it possible to access a remote web service Without UDDI?
Is c# an array?
4. Describe the process when we send a request URL? And who is responsible for that?
Is post back c#?
Does c# have a 'throws' clause?
Explain about CTS?
How can we sort the elements of the array in descending order?
What is a collection class in c#?
Which function is the entry point for a DLL in MS Windows 3.1?
What are the Features in .net framework 1.1
Can hashtable have duplicate keys in c#?
Why to use “finally” block in c#?
Which framework is best for desktop application?
What is an assembly qualified name? Is it a filename? How is it different?