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

What is private static class in java?

1004


how to create constants in java?

1069


What is the major advantage of external iteration over internal iteration?

1092


Can a main method be overloaded?

1005


How do you make a thread in java?

1080


Explain the importance of join() method in thread class?

1086


What is field name?

999


What is the static method?

1057


How many bits is a string?

974


What happens if an exception is throws from an object's constructor?

1110


What is array initialization in java?

1057


How do you use wildcards?

1033


What is the definition of tree ?

1019


What is scope of a variable?

1076


What is the difference between replace and replace all?

1001