Pregunta de entrevista de Pegasystems

How does a TreeSet in Java work?