There are many ways to answer this question, but one way to think about it is in terms of the star’s spectral type. The spectral type of a star is determined by its surface temperature, with the hottest stars being of type O, and the coolest stars being of type M. Therefore, we can say that the stars with the greatest surface temperature are those of spectral type O.