Pergunta de entrevista da empresa Sparta Systems

how could a program in java/c run out of memory?