Deloitte Interview Question

Mostly core java part