What is constructor

Answer Posted / mahesh

constructor is similar to a method.
*constructor name ,class name should be same
*constructor have a parameters
*does not return any value

*

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are primitives objects?

568


Describe how to implement singleton design pattern in struts.

537


What is a byte string?

625


What is the preferred size of a component in java programming?

545


When should you use arraylist and when should you use linkedlist?

500






What is the use of coding?

526


What is a functional interface?

549


Why do we need wrapper classes?

581


What does exclamation mean in java?

578


String class is defined under which package in java?

631


How to convert string to byte array and vice versa?

589


What are the loops in java?

529


What is a ?

760


What is difference between class and object in java?

533


Explain access modifiers in java.

590