What's the difference between constructors and other methods?

Java Programming Language >   Class, Object and Methods in java >   About Java Tutorial  

Short Question

864


Answer:

Constructors must have the same name as the class and can not return a value. They are only called once while regular methods could be called many times.


This Particular section is dedicated to Question & Answer only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.




Join Our telegram group to ask Questions

Click below button to join our groups.