# Energy conservation law

Hello,

I nowhere find general form of energy conservation law, but in one book i found this

$$(*)\hspace{1cm}E=E_{in}-E_{out}+E_{generated}$$

where E(in) is energy flow into system, E(out) is energy flow out of system and E(generated) is energy generated. It was in sense of heat conservation. Can I use this form of heat conservation law? Or is it true, when I say, (*) is energy conservation law?