Pregunta de entrevista de Sparta Systems

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