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

write a simple program inheritance?

Answer Posted / prashant khot

class A
{

}
class B extends A
{
public static void main(String args[])
{
B b = new B();

}
}
In the above example, B is the class extending the A class.
Means that B is inherited from A.

Is This Answer Correct ?    26 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What will be the default values of all the elements of an array defined as an instance variable?

1030


What is charat ()?

931


What is string builder?

893


What is the size of boolean variable?

1077


Who is founder of java?

997


When object is created and destroyed?

1103


What is the purpose of finalization in java programming?

1028


how is final different from finally and finalize in java?

1056


What is anti pattern in programming?

968


What is use of arraylist in java?

1176


Is zero a natural number?

1038


What are the data types supported by java? What is autoboxing and unboxing?

1022


what is meant wrapper classes?

1204


What is keyword auto for?

1186


What is java ceil?

1033