Cognizant interview question

questions related to oops in java