In computer programming, a utility class/function is code snippet that defines a set of methods/class that perform common, often re-used functions. Most utility classes define these common methods under static scope. Examples of utility classes include java.util.Collections which provides several utility methods (such as sorting) on objects that implement a Collection (java.util.Collection).