Cognizant interview question

Java programs and logic and Senario based questions