Accenture interview question

advantages of inheritance in java?