Which property classifies the star based on its temperature?

its apparent magnitude
its mass
its spectral type
its radius

its spectral type