Sunday 24 April 2016

Why you can't mark a class as both abstract and final?

Abstract and final have nearly opposite meanings. An abstract class must be subclassed, whereas a final class must not be subclassed. If you see this combination of abstract and final modifiers, used for a class or method declaration, the code will not compile.


You may also like to read:

1 comment:

  1. Hi, I am David the creator of www.springmockexams.com and www.javamockexams.com.

    I really want to thank you for this post, I am going to share it on all my social media, if you do not mind!

    I am also really enthusiast to announce some very exciting news: to celebrate the imminent release of Spring 5 and Java 9 we launched our simulators SALE CAMPAIGN. We lowered the price of our simulators at www.springmockexams.com and www.javamockexams.com for limited time only.

    If your audience is interested in accessing OUR PRICE OFFER, they can take a look here http://cm.gy/sme and here http://clktr4ck.com/java

    Thanks and check your featuring on our social medias!

    David

    ReplyDelete

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
If you are looking for a reference book on java then we recommend you to go for → Java The Complete Reference
Click on the image link below to get it now.