The Artima Developer Community
Sponsored Link

Design Forum
Can package have access modifiers

1 reply on 1 page. Most recent reply: Mar 18, 2003 6:18 PM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
mahesh

Posts: 3
Nickname: maccoy
Registered: Mar, 2003

Can package have access modifiers Posted: Mar 11, 2003 7:47 AM
Reply to this message Reply
Advertisement
IS it conceptually correct to set visibility options like public or private for packages?


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Can package have access modifiers Posted: Mar 18, 2003 6:18 PM
Reply to this message Reply
I don't think so. How would you use it? For instance, if you made a whole package private, it could not be used at all, right?

If you made it protected, for example, who would have access? Any package that includes that package's name (eg. members of the package com.cyclethere.tires.spokes could use members of the "protected" package com.cyclethere.tires?).

Can you offer a case where it might make sense?

Flat View: This topic has 1 reply on 1 page
Topic: Please help me with a program Previous Topic   Next Topic Topic: Who can advice about java menu?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use