what is constructer?what are the type of constructer with
example.

Answer Posted / sandesh nawadkar

Constructor is a same as method but it isnot exactly a
method . It has same name as a Class. It has access
specifier but not return type. Constructor is used to
create and initialize objects at runtime.
There are different types of constructors in different oop
languages.
e.g. Consider, java language-there are two types:-
1. Default
2. Parameterized.

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of cookies in java?

495


What is a context in java?

459


What is xml file in java?

482


What is entitymanager in java?

478


Explain working of java virtual machine (jvm)?

507






what about jdb and javadoc by example ?

1705


How do I create an executable jar file?

460


Is lambda functional programming?

477


Is lambda cheaper than ec2?

490


What is the meaning of the words public, static and void?

474


What is the most important feature of java?

457


What is factory pattern in java?

437


Is lambda expression an object?

491


Is jvm a compiler or an interpreter?

528


How long can a lambda function run?

469