Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


explain the concept of inheritance with an example?

Answers were Sorted based on User's Feedback



explain the concept of inheritance with an example?..

Answer / 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

explain the concept of inheritance with an example?..

Answer / muthusenthil

Inheritance is a process by which an object inherits parent
object quality.inheritance gives reusability
Consider a class Man derived class of Monkey an object of
man inherits some of monkeys qualities and overrides some
qualities like walking straight with two legs and have
additional functions like speach etc..

Is This Answer Correct ?    29 Yes 7 No

explain the concept of inheritance with an example?..

Answer / dsr

The base class properties into derived class. This is nown
as inheritance.

example: father and child relation. father properties power
get the child.

Is This Answer Correct ?    18 Yes 4 No

explain the concept of inheritance with an example?..

Answer / chintan

Inheritance is the process by which new classes called
derived classes are created from existing classes called
base classes. The derived classes have all the features of
the base class and the programmer can choose to add new
features specific to the newly created derived class.

Is This Answer Correct ?    20 Yes 6 No

explain the concept of inheritance with an example?..

Answer / ravikiran(aptech mumbai)

inheritance is the proces of inheriting the properties of
super class into the subclass

Is This Answer Correct ?    18 Yes 6 No

explain the concept of inheritance with an example?..

Answer / kk

Inheritance is the process of extending the properties of super class to sub class(methods and variables) if required overriding the properties(methods)
eg...
child having(extended) the Characters(Behavior) of father.

Is This Answer Correct ?    8 Yes 4 No

explain the concept of inheritance with an example?..

Answer / 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

explain the concept of inheritance with an example?..

Answer / kkr

Inheritance is the process of creating the classes from existing classes by using 'extends' key word.
It is like IS-A relationship between the classes.

eg : Parent and child relationship. we cal parent class as super class and child class will be subclass.i.e the subclass will have all the members of super class.

Adv : Reusability of the code.i.e productivity will be increase. 

Is This Answer Correct ?    1 Yes 0 No

explain the concept of inheritance with an example?..

Answer / ackrao

Deriving the properties of one class in to another class is called as inheritance.

Existing class is base class and new class is derived class.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

Is java an ide?

0 Answers  


Can we add two byte variables and assign the result to a byte variable ? b=b1+b2 where b,b1,b2 are byte types

4 Answers   TCS,


class{ ... ... interface myinterface{ ... ... } abstract class{ .. .. } ... .. .. } is this possible to write "Interface and/ or Abstract class inside a class ? if possible whcich one is possible is only interface? is only abstract?

2 Answers   Logica CMG,


What is collection class in java?

0 Answers  


What is Collection interface?

1 Answers   Zensar,


Can variables be used in java without initialization?

0 Answers  


Is boolean a data type in java?

0 Answers  


What do you mean by thread safe?

0 Answers  


Can you declare a private method as static?

0 Answers   TCS,


What are the types of exceptions?

0 Answers  


What is output buffer?

0 Answers  


What error occurs if a try-catch-finally statement sequence does not have a catch clause?

4 Answers  


Categories