Looking at the ArrayUtils class from the apache community, the document says:
ArrayUtils()
ArrayUtils instances must NOT be built in standard programming.
I looked at the source code of this class, and I saw that they made a public constructor:
public ArrayUtils() { super(); }
Since all methods / fields of the class are static, I understand that it makes no sense to instantiate this class.
So why didn't they make the constructor private , like in the Math class, to avoid creating new instances?
java constructor
user2336315
source share