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

  • Home
  • SEARCH
  • 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 6093549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:34:21+00:00 2026-05-23T12:34:21+00:00

Thanks for the great answers about inheritance. Just one more quick question: A subclass

  • 0

Thanks for the great answers about inheritance. Just one more quick question:

A subclass can always inherit the protected members of its superclass. Is that true even if they are not in the same package?

  • 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-23T12:34:22+00:00Added an answer on May 23, 2026 at 12:34 pm

    Yes, they can always inherit the protected members of its superclass regardless of the package they are in.

    From the JLS Section 6.6.2,

    A protected member or constructor of
    an object may be accessed from outside
    the package in which it is declared
    only by code that is responsible for
    the implementation of that object.

    From the Java Tutorial,

    The protected modifier specifies that
    the member can only be accessed within
    its own package (as with
    package-private) and, in addition, by
    a subclass of its class in another
    package.

    I think, this may be your required solution

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

Sidebar

Related Questions

Thanks a lot for all the beautiful answers! Cannot mark just one as correct
Thanks for answers,Actually I am not puzzled about draw 1024*768 pixels is slower than
I am working on a dating site and thanks to the great answers I
Thanks for all the great answers, this helps a lot! Hello, I need some
Quick question about WordPress. I've been Googling all over the place and cannot find
I have a little question about how can i handle user when they are
Thanks to some great folks on SO, I discovered the possibilities offered by collections.defaultdict
Thanks to a Q&A on stackoverflow. I just found out how to determine the
After exploring the very excellent answer from Heike to my previous question about anamorphic
This is really an extension of my question yesterday where I learned about apply.weekly

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.