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 8887561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:50:22+00:00 2026-06-14T21:50:22+00:00

Through google, there are found many slightly different solutions to this, even though (to

  • 0

Through google, there are found many slightly different solutions to this, even though (to me) it feels like it should be much easier to answer. These are the words I’m worrying about right now, while trying to acquire decent UML’ing skills :D…

“public, protected, private, package”

Let me first try to get this complete for Java, because I feel pretty familiar with it (correct me please, if I did any evil nevertheless!):

  1. Public
    • Members of the same instance can see/use this
    • Members of another instance of the same class can see/use this
    • Members of derivative classes in the same pkg can see/use this
    • Members of derivative classes in another pkg can see/use this
    • Members of another class in the same pkg can see/use this
    • Members of another class in another pkg can see/use this
    • Anything else can see/use this
  2. Protected
    • Members of the same instance can see/use this
    • Members of another instance of the same class can see/use this
    • Members of derivative classes in the same pkg can see/use this
    • Members of derivative classes in another pkg can see/use this
    • Members of another class in the same pkg cannot see/use this
    • Members of another class in another pkg cannot see/use this
    • Anything else cannot see/use this
  3. Private
    • Members of the same instance can see/use this
    • Members of another instance of the same class can see/use this
    • Members of derivative classes in the same pkg cannot see/use this
    • Members of derivative classes in another pkg cannot see/use this
    • Members of another class in the same pkg cannot see/use this
    • Members of another class in another pkg cannot see/use this
    • Anything else cannot see/use this
  4. Package
    • Members of the same instance can see/use this
    • Members of another instance of the same class can see/use this
    • Members of derivative classes in the same pkg can see/use this
    • Members of derivative classes in another pkg cannot see/use this
    • Members of another class in the same pkg can see/use this
    • Members of another class in another pkg cannot see/use this
    • Anything else cannot see/use this

My questions now:

  1. How exactly does this differ from the UML standard?
  2. Where did I include errors in the upper list, if I did? I’m not god, so there might be one 😉

Best regards, and thanks in advance for any help!

  • 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-06-14T21:50:23+00:00Added an answer on June 14, 2026 at 9:50 pm

    From the UML standard. Visibility:

    A public element is visible to all elements that can access the contents of the namespace that owns it.

    A private element is only visible inside the namespace that owns it.

    A protected element is visible to elements that have a generalization relationship to the namespace that owns it.

    A package element is owned by a namespace that is not a package, and is visible to elements that are in the same package as its owning namespace. Only named elements that are not owned by packages can be marked as having package visibility. Any element marked as having package visibility is visible to all elements within the nearest enclosing package (given that other owning elements have proper visibility). Outside the nearest enclosing package, an element marked as having package visibility is not visible.

    Namespace:

    A namespace is a named element that can own other named elements.

    I think the UML definitions of private, protected, etc. are fairly similar to those of Java.

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

Sidebar

Related Questions

I have looked through Google Closure Compiler and found this . it doesn't like
Is there anyway, using google analytics, to track a user's journey/selections through a long
Sorry that I can't find the answer through google - But I know this
Many search engines are not using meta keywords and Google through many recent updates
I found that the Google Maps API supports Directions through: var map; var directionsPanel;
I found a simple Google App Engine open source app which I'd like to
I have search through google and found that a lot of people is struggling
I have found a XML file through google search that will help me for
I've been seeking for this problem through all google, stackoverflow and more. And I
I'm sorry if this is a question answered elsewhere. Searching through Google and Stackforum

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.