what are the types of constructer explain with example

Answer Posted / kailash

there are two types of Constructors .
1. Parameterized Constructor inwhich we give arguments .
2. Default constructor , there no argument is given .
for each class there must be a defult constructor .

Is This Answer Correct ?    14 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you understand by downcasting?

515


Can we extract main method from another class?

514


What is an entity in java?

480


How do I enable jvm?

468


What is the difference between java se and java ee?

432






What are the benefits of a jar file?

502


What is serializable in java?

476


What is cloning in java?

493


What is cdi in java?

486


Explain different way of using thread?

586


Who developed rxjava?

471


What is data encapsulation?

526


What does persist mean in java?

498


What is lambda used for?

467


How do I enable java in google chrome?

449