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 an abstract class be final?

Answer Posted / artavazd amirkhanyan

It's good question because of most of people can't explain why we can't have abstract final classes in Java. Most of them says "An abstract class is of no use if it cannot be extended or instantiated". Imagine class where we have 10 static methods and we want them to be final to never be overridden. Now, because of class have only static methods,we can make it abstract and because of restriction on overriding, we can make it final. So abstract final classes can be very useful in aforementioned cases. But we can't have abstract final classes in Java just stupidly because of Java do not let us. And this is one of many silly restrictions of Java.

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is append function?

993


What is parsing in grammar?

1040


When a byte datatype is used?

2182


What are design patterns and please explain?

1082


What are the different types of methodologies?

1002


What is the difference between overriding & overloading?

1068


what is the purpose of the runtime class?

1058


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

991


Can private class be inherited in java?

1027


Difference between nested and inner classes ?

1122


What do you mean by access modifier?

1024


What is anti pattern in java?

964


Can sleep() method causes another thread to sleep?

1036


Can It is possible to synchronize the constructor of a Java Class?

1116


How can we make copy of a java object?

1147