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 you have a constructor in abstract class?

Answer Posted / suresh

any class which extends with an object class should have a
constructor whether a class is abstract class or not.
if a abstract class is super class to some sub classes,
then the abstract class should extneds with oject class.
EX: abstract class A{
A{
super(); /// it ll give a call to super class
/// super() we can use only in
constructor
}

}
class B extends A{

}
means any class should extnd with super class.
because of this abstract classes are not 100% abstract.
interface is 100% abstract.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is java hashset ordered?

1105


What is the difference between delete and delete[]

1529


What are generic methods?

968


What is meant by design patterns?

1022


When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?

997


Why constructor has no return type?

1099


what is singleton class in java?

1045


Is the milky way in a void?

960


is there a separate stack for each thread in java? : Java thread

971


How are this() and super() used with constructors in java programming?

1059


What is the indent key?

1029


Is 0 an even number?

985


How to reverse a string in java?

1070


Is arraylist an object in java?

1136


What is thread count in java?

1003