When switch S is closed, a current begins to flow and grows until it reaches a final value. An inductor (inductance L) and a resistor (resistance R)…

When switch S is closed, a current begins to flow and grows until it reaches a final value. An inductor (inductance L) and a resistor (resistance R) are connected to a source of emf as shown. When switch S is closed, a current begins to flow and grows until it reaches a final value. Where does this energy go in the case of an inductor?