Cognizant Interview Question

To solve some java questions