Inspectopedia
 
2024.3

Class without no-arg constructor

Warning
New
Last modified: 03 December 2024

Reports classes without a constructor that takes no arguments (i.e. has no parameters). No-arg constructors are necessary in some contexts. For example, if a class needs to be created using reflection.

Example:

Use the checkbox below to ignore classes without explicit constructors. The compiler provides a default no-arg constructor to such classes.