What is a default constructor give one example?

The default constructor initializes instance variables with default values . For example, the int variable will be initialized to 0. Constructor types: No-Arg Constructor – a constructor that does not accept any arguments.

Sizin İçin Seçtik  Can I get an Akita?

Leave a Reply

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