Open hrstoyanov opened 4 years ago
Because all its methods are static methods. This would prevent people from doing stupid things like: UnsignedNumbers un = new UnsignedNumbers();
UnsignedNumbers un = new UnsignedNumbers();
...Or make the class final and add a private constructor:
public class UnsignedNumbers { private UnsignedNumbers(){/*do not instantiate me*/} }
Because all its methods are static methods. This would prevent people from doing stupid things like:
UnsignedNumbers un = new UnsignedNumbers();
...Or make the class final and add a private constructor: