Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6828721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:24:58+00:00 2026-05-26T22:24:58+00:00

Effective Java (Joshua Bloch) Item 17 says : Design and Document or inheritance or

  • 0

Effective Java (Joshua Bloch) Item 17 says :

“Design and Document or inheritance or else prohibit it”

However, just a cursory glance through the Android APIs reveals that most of the API classes are non-final; which is OK if they are also documented for inheritance (View of Activity, for example). But there are also several non-final classes, but the documentation makes no mention about the inheritability of these classes. Just some arbitrary examples to illustrate my point:

  • The classes representing the System Services (WifiManager, NotificationManager …)
  • Utility classes like UriMatcher.
  • Some hardware-specific classes like Camera.

Openness and extensibility being the philosophy of Android, is the convention reversed here? Meaning, could one assume that all of the Android API classes are designed to be inherited (whether explicitly documented or otherwise); unless declared final?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:24:59+00:00Added an answer on May 26, 2026 at 10:24 pm

    Just my €0,02: Clean OO design by the book is one thing, making things work for all possible use cases in practice is another. The principles of clean OO design sometimes are somewhat of academic nature. – And maybe a little bit of black and white.

    Think for instance about who uses the Android API provided by google: It’s not only app developers but also device manufacturers who need to specialize general APIs for their devices.

    So, for me, SW design is neither black nor white in most cases; the shades of grey are important.

    And finally: In practice I have seldom (read: never) seen problems caused by “carelessly” omitted final keywords (on classes), while unreflected overuse of final (often caused by thoughts like “my code is sooo [great | ugly], no one will actually ever want to modify it through inheritance”) can be quite a pain.

    “I know that I know nothing” seems to fit here: It is presumptuous to claim that one knows all the crazy, ingenious, creative, smart,… ideas of others for how one’s code may be used in the future beforehand.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently reading Effective Java by Joshua Bloch and Item 17 is 'Design and
Joshua Bloch's Effective Java, Item 51 is not about depending on the thread scheduler
Item 16 of Effective Java 2nd edition, favor composition over inheritance says the following
I'm reading through Chapter 3 of Joshua Bloch's Effective Java . In Item 8:
In Josh Bloch's excellent book Effective Java under Item 39 he says: [D]efensive copies
from p.46 Effective Java Joshua Bloch. Item 9: ALways override hashCode when you override
I'm referring to the paradigm in Item 34 in Effective Java by Joshua Bloch.
I was reading Joshua Bloch's Effective Java Programming Language Guide . He explains static
I am reading Effective Java by Joshua Bloch. At the top of page 16,
I read Effective Java by Joshua Bloch and removed the 'Constant Interface anti-pattern' from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.