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 the constructor?

1097


Explain java coding standards for methods?

1086


What is the difference between import java.util.date and java .util?

1100


What is pre increment and post increment in java?

1033


Is java same as core java?

1166


What is the purpose of the finally clause of a try-catch-finally statement in java programming?

1009


What are the benefits of operations in java?

1129


Write a program based on Java script program.

1202


What is java objectoutputstream?

1030


What are the legal parameters?

1060


what is the purpose of the runtime class?

1107


What makes a function well defined?

1034


Why is inheritance used in java?

1172


Can we convert stringbuffer to string?

1055


Explain the difference between serializable and externalizable in java?

1135