Pergunta de entrevista da empresa ADP

If I remove "public" what happens? If I remove "else" will the function remain unchanged?