The sentence that is an example of a simile is: "The stars were like diamonds in the sky."
A simile is a figure of speech that compares two different things using the words "like" or "as." In this case, the stars are being compared to diamonds using "like."