What is meant by constructor?

Answer Posted / shiva

java allows objects to initilize themselves when they are
created .this automatic initilization is done wih the use
of constructor .a constructor is a special type of method
that has the same name of its class.when ever an object of
class is created,its constructor will be invoked and it
will initilized the object.the return type for a
constructor is not defined as it implicitly takes its class
type as return type.

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many characters is 2 bytes?

520


What is finally and finalize in java?

585


Difference between abstract and concrete class ?

575


Is there a way to increase the size of an array after its declaration?

591


How do you sort an array in java?

531






How does arraylist size increase in java?

525


Can a static member function access member variable of an object?

554


What is null in java?

517


what is the messsage u r going to get from an objectoriented programing?

1600


How many tetrahedral voids are there in bcc?

536


How can you set the applet size?

565


What is abstraction in java?

611


What are different exception types exceptions available in java ?

469


What is the use of generics? When was it added to the Java development Kit?

546


Which software is used for java programming?

544