Cognizant interview question

What are the oops concept in java and explain it with real time examples