Pergunta de entrevista da empresa Dynatrace

Difference between heap and stack in java