Infosys interview question

Java based on oops concepts