Morgan Stanley interview question

general java questions