Gajendra Interview Question

Questions on core java and puzzle