Infosys interview question

Java Basics, Oops Concept, Programming on online compiler