Cognizant Interview Question

About java basics and some logical questions