Quantcast
Channel: Question and Answer » default
Viewing all articles
Browse latest Browse all 17

Should all classes have a default constructor as part of good coding convention

$
0
0

From the texts I have read so far, the conventions talk about organizing constructors, starting with the default, if any. I am wondering, should all classes have a default constructor anyway. This will at least help to create a simple instance of the class on the fly, without having to use a parameterized constructor, which itself may require additional imports for specific parameter type.


Viewing all articles
Browse latest Browse all 17

Trending Articles