This is usually a class that only has static methods (possibly with a private constructor and tagged abstract / final to prevent instantiation / subclassing). It exists only to simplify the use of other classes, for example, to provide a bunch of static methods for working with values String, to perform additional actions that it Stringdoes not support.
Utility classes do not usually work on classes that you control, because otherwise you usually inject behavior directly into this class. They are not very accurate in terms of OO, but can still be useful.
source
share