|Modern example of a black body (a TIRFI black body), light goes in the hole, bounces around, and is assumed to be absorbed 100% into the black walls of the inside container.|
In 1900, Max Planck theorized that the internal energy U of a black body (resonator) could be divided into a discrete number of “energy elements” ε by the expression:
where P is large integer. In his 1901 paper “On the Law of Distribution of Energy in the Normal Spectrum”, Planck went a step further and, supposedly, used Boltzmann's 1872 H-function model to explain that the entropy SN of the black body system [resonator] is proportional to the logarithm of its probability or multiplicity W, within an arbitrary additive constant: 
S = k log W + const
In his 1909 lectures, Planck was calling the following equation (without the added constant):
S = k log W
the ‘general definition of entropy’, albeit discussed in his chapter on the equation of state of a monoatomic gas.
The supposition that bodies could be divided into energy elements later led German-born American physicist Albert Einstein, in 1905, to propose that light itself could be quantized and was composed of quantums of energy, i.e. light quantums. As Einstein wrote in the introduction to his March 1905 paper: 
“According to the assumption to be contemplated here, when a light ray is spread from a point, the energy is not distributed continuously over ever-increasing spaces, but consists of a finite number of energy quanta that are localized in points in space, move without dividing, and can be absorbed or generated only as a whole.”
These light quantums later came to be called “photons”, a term introduced in 1926 by American physical chemist Gilbert Lewis. These developments launched the development quantum mechanics (1926), quantum chemistry (1930s), and quantum thermodynamics (c.1990s).
1. Planck, Max. (1901). "On the Law of Distribution of Energy in the Normal Spectrum". Annalen der Physik, vol. 4, p. 553 ff.
2. Einstein, Albert. (1905). “On a Heuristic Point of View about the Creation and Conversion of Light”, Annalen der Physik March 18.
● Black body – Wikipedia.
● Blackbody – Eric Weisstein’s World of Physics.