infiniX (India) interview question

Question - OOPs in Java