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

What is the purpose of the enableevents() method in java programming?

592


Write a function for palindrome and factorial and explain?

661


How do you calculate square roots?

581


What is io stream in java?

522


Given a singly linked list, determine whether it contains a loop or not without using temporary space?

586






How does finally block differ from finalize() method?

589


How can we achieve thread safety in java?

689


What is the char data type?

528


How can we access some class in another class in java?

555


Define locale.

590


How do you join strings in java?

528


What does percent mean in java?

592


Is null a keyword in java?

559


What are the main features of java?

532


Why java is object oriented?

592