Cognizant Interview Question

JAVA basic question like oops & all