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

What are the approaches that you will follow for making a program very efficient?

1127


Explain listiterator and methods in listiterator?

1064


What do you mean by ordered and sorted in collections in java?

1039


What are three advantages of using functions?

1054


How does thread synchronization occurs inside a monitor?

1181


What is initial size of arraylist in java?

1098


What do you mean by inner class in java? Explain

1120


Can an arraylist be empty?

1101


How do you convert int to char in java?

1121


What is purpose of find feature?

1151


Can we restart a thread already started in java?

1146


Where is the singleton class used?

1079


How is string stored in java?

1119


Does substring create a new object?

1050


What do you mean by constant time complexity?

1339