Morgan Stanley interview question

i found java programs difficult