Pergunta de entrevista da empresa Coforge

What is the hashCode() contract? String vs StringBuilder vs StringBuffer