RafterOne interview question

Oops concept in java,basics of sql.