Wipro interview question

about OOPs in java