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...

Advantages of Inheritance in java.

Answer Posted / kureshi salman

Inheritance means deriving a child class from a parent class
(i.e.existing class).
Use of inheritance iin java is we can reuse of a code.
For Ex.
class a
{
//variables.....
//methods.......
}
class b extends a
{
//variable of class a....
//methods of class a.....
//also
//variables and methods of class b
}
it means that we can inherit the class and features of
existing class in a new class.

Is This Answer Correct ?    29 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you add an element to a set in java?

975


does java support pointers?

933


What is data member in java?

955


What is the role of garbage collector in java?

900


Is boolean a data type in java?

900


Can we use catch statement for checked exceptions?

914


How many static init can you have?

1143


how many types of Inheritance?

1121


What is the inheritance?

925


Can we call virtual funciton in a constructor ?

2135


Difference between overriding and overloading in java?

1007


What do you mean by a JVM?

1140


How does multithreading take place on a computer with a single cpu in java programming?

955


When throws keyword is used?

946


What are the important methods of java exception class?

1024