HTC Global Services interview question

Questions from basic java and oops concept