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

Can we inherit the constructor in a Class?please give one
example.

Answer Posted / amit

class demo
{
demo()
{
System.out.println("i am default constructor ");
}
}
class demo1 extends demo
{
demo1()
{
System.out.println("i am default constructor ");
}
}
class test
{
public static void main(String st[])
{
demo1 ob=new demo1();
}
}




but it is inherited constructor ....so be can say inherited constructor or/not ?????????

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which variables are stored in stack?

863


What methods are used in Servlet?Applet communication?

2186


What is difference between equal and == in java?

910


Explain oops concepts in detail?

974


Why enumeration is faster than iterator?

895


What is a condition in programming?

966


What is jdbc api?

966


Are generics important java?

929


How many times finalize method will be invoked? Who invokes finalize() method in java?

970


What are the java ide’s?

992


What does %4d mean in java?

1428


What are the advantages of passing this into a method instead of the current class object itself?

1626


Explain an algorithm to find depth of a binary tree.

999


What's the default access specifier for variables and methods of a class?

1064


List out five keywords related to exception handling ?

965