Cognizant interview question

java question inheritance