Cognizant interview question

java oops based questions on 2 nd round