Cognizant interview question

Basics of Java, oops and mental ability questions