Which of these is equivalent to the law of conservation of energy?

A. The total mechanical energy is always conserved.
B. Friction is a nonconservative force.
C. Kinetic energy can be transformed into thermal energy.
D. The total energy of all types remains the same in a closed system.