Computer Science, asked by samarthbadhe6263, 1 year ago

If a class lacks a no-arg constructor, the compiler always creates a default constructor. is this correct

Answers

Answered by srinu360
0
The default constructor initialises method variables.

The default constructor has the same access as its class.

The default constructor invokes the no-arg constructor of the superclass.

If a class lacks a no-arg constructor, the compiler always creates a default constructor.

The compiler creates a default constructor only when there are no other constructors for the class.

Similar questions