• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Ever a case when a class cannot extend or inherit anything

 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there ever a case, between, nested, top-level, anonymous, etc. classes that can not extend another class or inherit an interface. I know for anonymous classes you can not both extend and inherit (nor do multiple inheritance), but are there any other specifications for inheritance or extending?
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Wilson,
If a class has a final access modifier, then we cannot extend that class.
For eg.

We wont be able to extend this class as it is defined as final class.

Hope this helps.
Best Regards
Mandar
[ May 10, 2003: Message edited by: Mandar Puranik ]
 
There will be plenty of time to discuss your objections when and if you return. The cargo is this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic