Helper class

In object-oriented programming, a helper class is used to assist in providing some functionality, which isn't the main goal of the application or class in which it is used.[1][2] An instance of a helper class is called a helper object (for example, in the delegation pattern).

Helper classes are often created in introductory programming lessons, after the novice programmer has moved beyond creating one or two classes.

A utility class is a special case of a helper class in which the methods are all static.[3] In general, helper classes do not have to have all static methods, but may have instance variables. Multiple instances of the helper class may exist as well.

  1. ^ Tee, Sim Hui (2009-12-03). "Eliminating method redundancy for the improvement of inner class design". ACM SIGSOFT Software Engineering Notes. 34 (6): 1–3. doi:10.1145/1640162.1640174. ISSN 0163-5948.
  2. ^ "What is a helper? Is it a design pattern? Is it an algorithm?". Software Engineering Stack Exchange. Retrieved 2023-10-31.
  3. ^ "Java Helper vs. Utility Classes | Baeldung". Baeldung. April 28, 2023. Retrieved October 31, 2023.