theTemperature = temperature; // register for temperature change events theTemperature. addTempChangeListener(this);
// do something with the temperature that we can retrieve // by calling evt.getTemperature()