Thermodynamics

Why can a thermometer measure the temperature of a body without knowing the body's total internal energy?