Explain constructor?

Answers were Sorted based on User's Feedback



Explain constructor?..

Answer / satish

A constructor is a method that is used to create new
instances of a class. You can easily recognize a
constructor because it has the same name as the class and
is defined with syntax similar to that of a method
definition, but it has no return type.

Is This Answer Correct ?    12 Yes 1 No

Explain constructor?..

Answer / ranjanatyagi

A constructor has the same name as class name.Constructor
has no return type.Constructor are used to initialize the
object.

Is This Answer Correct ?    7 Yes 0 No

Explain constructor?..

Answer / tiger senthil

Complier identifies the class name and method name sdould
be the name.which invoked when class instanciate the
object.Here possible to overload the constructor.

Is This Answer Correct ?    4 Yes 1 No

Explain constructor?..

Answer / salman

A constructor has the same name as class name.Constructor
has no return type.Constructor are used to initialize the
object.

Is This Answer Correct ?    3 Yes 0 No

Explain constructor?..

Answer / pragnyan

Constructor is a method having the same name as the class
name.It is automatically invoked when instance of the class
is created.It is used to initialize the members.Constructos
canot have any return type not even void.constructors can
be overloaded.

Is This Answer Correct ?    2 Yes 0 No

Explain constructor?..

Answer / surabathina

constructor is a method it gets invoked when instance of
the class is created

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is the difference between package and interface?

0 Answers   Hexaware,


Can you mark static constructor with access modifiers?

0 Answers  


What is an array? Give the syntax for a single and multi-dimensional array?

0 Answers  


Can we override static class in c#?

0 Answers  


What does the keyword “virtual” declare for a method or property?

0 Answers   Siebel,






Explain the process of inheriting a class into another class?

0 Answers  


how encapsulation is implemented in c#

0 Answers   Cognizant,


C# is case sensitive, what is mean by case sensitive

3 Answers  


What is the difference between string keyword and system.string class?

0 Answers  


When should we use delegates in c#?

0 Answers  


Why do we need singleton class in c#?

0 Answers  


What is the differnce between Array and Hash Table?

3 Answers   Impetus, TCS,


Categories