Sankey Solutions interview question

Explain Java OOPs concepts with examples of each