Looking at the ArrayUtils
class from apache commons, the doc says :
ArrayUtils()
ArrayUtils instances should NOT be constructed in standard programming.
I was looking at the source code of this class, and I saw they made the constructor public :
public ArrayUtils() {
super();
}
Since all the methods/fields of the class are static, I understand that it makes no sense to create an instance of this class.
So why don't they made the constructor private
like in the Math
class to avoid creation of new instances?
The documentation says:
This constructor is public to permit tools that require a JavaBean instance to operate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With