Simple Stack on Java (gen)