What is a constructor?

Answers were Sorted based on User's Feedback



What is a constructor?..

Answer / suma

A constructor is one which is used to initialize the
instance variables of an object.

Is This Answer Correct ?    7 Yes 1 No

What is a constructor?..

Answer / srinivasa reddy

Guarrented intilization of instance variables of an object.

Is This Answer Correct ?    3 Yes 2 No

What is a constructor?..

Answer / saravanan

Class name and Methods name are same. It has no Return type.
When create a instance with class the method is
automatically called.

Is This Answer Correct ?    0 Yes 0 No

What is a constructor?..

Answer / sunil kumar

Constructor is a special method having the same name as class name, without any return type not even void. And it is used to initialize the instance variable.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Java J2EE AllOther Interview Questions

can u draw class/object diagram for ATM

0 Answers   HCL, Zycus Infotech,


what is the IDE that you have used to write your java programs?

2 Answers   Inforica, Interface Software,


wnet use DAO design in u r project?

1 Answers   Godrej,


whats the relation ship between LDAP and JNDI?

1 Answers  


What are the interfaces in java collections? : java collections

0 Answers  






What are the uses of the set interfaces in the java collections? : java collections

0 Answers  


2. Write a interface "Car" with the following methods void setName(String) String getName() void setColor(String) String getColor() void setModel(long) long getModel()

1 Answers  


Is it possible to create Userdefined Unchecked Exception also?If Yes, give an example?

1 Answers   HCL,


How do you debug your java program?

2 Answers   HCL, Inforica,


what is the difference between through and throws?

2 Answers   HCL,


In HashSet duplicates are allowed while adding to the HashSet, but while retreiving the object from HashSet is not shown the duplicate values, WHY ?

2 Answers   Cap Gemini,


Hi we have an urgent requirement for Java/J2ee technical lead position & also looking for "Java Guidewire claimcentre" experienced professional for Bangalore location if interested can reach srisanh@gmail.com

0 Answers  


Categories