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

There can be a abstract class without abstract methods, but
what is the need to declare a class abstract if it doesn't
contain abstract methods?

Answer Posted / gkp

Abstract class and Interface are the design time decision. As we expect to extend our implementation in future so we need to give space to incorporate new implementation. As we know if some implementation of a method will be common in many classes then that method should be moved to abstract class so the repetition of same code can be avoided. Even though we don't have any abstract method in our abstract class, we can go for a abstract class. Generally in design of java classes, it is designed like, first an interface then an abstract class and then concrete class implementation starts.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are parameters used in functions?

955


What are drawbacks of singleton class?

918


What is return data type?

948


How does arraylist size increase in java?

1056


How to sort an array in java without using sort method?

857


What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?

912


What is functional interface in java?

1000


What is fail first in java?

1100


Write a factorial program using recursion in java?

958


What one should take care of, while serializing the object?

863


What are 5 boolean operators?

1114


what is thread? What are the high-level thread states? Or what are the states associated in the thread? : Java thread

951


hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea

1867


What is the reason behind using constructors and destructors?

1011


What an i/o filter in java programming?

1023