explain the concept of inheritance with an example?

Answer Posted / shekar

Inheritence is the process by which one object acquires the
properties of another object. by using the extends keyword.

Adv:

It is easier to reuse code

Is This Answer Correct ?    40 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Should a main method be compulsorily declared in all java classes?

536


What is unmodifiable list in java?

536


What is a predicate method?

568


What is charat ()?

531


How do I get the | symbol on my keyboard?

596






What’s the difference between applets and standalone program?

534


How many bytes is a string java?

534


What does the “static” keyword mean? Can you override private or static method in java?

636


why using interface interface ?

1514


Difference between static binding and dynamic binding?

569


Is string pool garbage collected?

551


What are the differences between checked exception and unchecked exception?

530


Where is singleton pattern used?

531


Can we use static class instead of singleton?

582


What is the primary benefit of encapsulation?

562