Pergunta de entrevista da empresa HCLTech

how define class with different type of return type ??