Morgan Stanley interview question

some knowledga base question about java fundamental and java 8