Deloitte interview question

Basic Java questions from first year