explain the concept of inheritance with an example?

Answer Posted / kush singh

Inheritance is a process of inheriting members and member functions of a particular class. This means one class can use the data members and functions of another similar class. This reduces efforts as similar data members or functions do not need to be declared again and again.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

when a request is generated from apache tomcat 5.5 and goes to oracle 10g or mysql,,, how the oracle or mysql reads the request as apache is a web server and oracle 10g is application server? when the oracle 10g provides response, how the apche tomcat reads it???

1913


What is a Hash Table? What are the advantages of using a hash table?

857


enlist some features of jdk.

748


What technique is carried out to find out if a particular string is empty?

797


What is the difference between length and length() method in java?

862


What is the purpose of checked and unchecked exceptions in JAVA?

790


How do you achieve polymorphism in java?

724


How to use Media tracker Class.

866


What is complexity and its types?

732


How many types of operators are there?

730


Explain different types of thread priorities ?

859


What are the two ways of implementing multi-threading in java?

1158


Why string is called as immutable?

724


How can you read content from file in java?

807


How do you escape in java?

813