Can we use constructor as a method in Java?

No, you cannot call a constructor from a method. The only place from which you can invoke constructors using “this()” or, “super()” is the first line of another constructor.

Sizin İçin Seçtik  Which server is best for mobile app?

Leave a Reply

Your email address will not be published. Required fields are marked *