Pergunta de entrevista da empresa Virtusa

how do you sort object in java with the attributes of firstname and lastname based on last name