Cognizant interview question

Basic of OOPS Java SQL some aptitude questions and tested some learning abilities