Can constructor perform other tasks instead of initialization?

Java Programming Language >   Class, Object and Methods in java >   Constructor  

Short Question

1157


Answer:

Yes, like object creation, starting a thread, calling a method, etc. You can perform any operation in the constructor as you perform in the method.


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.