Infosys interview question

Java theory and 1 program.