Infosys Interview Question

about java classes and other logics in java