Accessing protected members

Hi,
Can one of you please clarify the following doubt.
CLASS A
package com;
public class A {
     protected String name = "JAVA";
     protected void m1(){
          System.out.println("m1");     
CLASS B
package com.abc;
import com.A;
public class B extends A {
     public static void main( String [] args ) {
          B b = new B();
          b.mt();
     public void mt() {
          System.out.println("name --> " + name);
          m1();
CLASS C
package com.abc.xyz;
import com.abc.B;
public class C extends B {
     public static void main( String [] args ) {
          C c = new C();
          c.mttt();
     public void mttt() {
          System.out.println("name --> " + name);
          m1();
====================================
Now in one of the books I read that a protected member of parent class (say A) is accesible thru inheritance in a subclass in different package (say B). Perfect!
But also says that another class (say C) inheriting the above subclass either in a the same or different package cannot access the protected members of the parent class (A).
Surprisingly above code compiles and runs perfectly on my machine. Checked the JDK version and is 1.3 but the books is for 1.4
Can some one please clarify which is correct.
Thanks in Advance.

I was expecting a compilation error (in class C as it cannot access the protected members of class A) according to the book I read. But I observed that it is compiling and running perfectly.
Following the code again for clarity:
CLASS A
package com;
public class A {
     protected String name = "JAVA";
     protected void m1(){
          System.out.println("m1");
CLASS B
package com.abc;
import com.A;
public class B extends A {
     public static void main( String [] args ) {
          B b = new B();
          b.mt();
     public void mt() {
          System.out.println("name --> " + name);
          m1();
CLASS C
package com.abc.xyz;
import com.abc.B;
public class C extends B {
     public static void main( String [] args ) {
          C c = new C();
          c.mttt();
     public void mttt() {
          System.out.println("name --> " + name);
          m1();
}Message was edited by:
talk2key

Similar Messages

  • Class Visibility of Protected Members between Packages

    Hi,
    I'm developing a system that consists of package A, which in turn contains packages B and C. My database access class is in a package by itself (package A.B) and I want anyone who uses it to provide a username and password. In order to do this, my system has a class called Config.java which resides in package A. When Config.java is instantiated, it will read the contents of some configuration xml file on the system and set protected variables for the username and password.
    My problem is the following:
    1. Config.java is not visible to any other classes in other packages unless it is public
    2. If Config.java is made public, then anyone can inherit from it and have access to its protected members.
    3. The other classes (in package A.C) must have access to the username and password in order to supply it to the database access class.
    How can I get around this?
    Thanks,
    Ama

    What is your concern, what someone will hack your
    database by deriving
    from Config?
    Is that a reasonable fear -- couldn't they just look
    in the XML file you mention?Well, hopefully that xml wont be so accessible, I'm thinking it will be necessary in case the user wants to modify any database settings through the application configuration screens.
    I guess what my question is really, is where would a large application that needs to access a database usually store the username and password information? Surely it cant be hardcoded in the application somewhere? What if the user wants to change the connection info?

  • How do i turn on network access protection on windows 8.1 with an hp p6-2326S pc?

    i got a phone call from a unknown source today  at around  3 pm they said  that hackers where trying to access my computer . they  ran a scan  and it showed thre things one was  my network access protection was turned off .  2 hackers were trying to hack into my computer  i cant remember the 3rd one its in my note pad  but  then i got this big run around and i told them from the start that i had no money and that i had just buried my mom on the 2nd of this month after a long battle   and that i had just had a bad episode with my blood pressure wasnt feeling god  and so on ,all of which are true  once i finally convinced the  worker of the fact i had no money he put his super visor on the line .the supervisor was stalling i could tell im no dummy when it comes to software and computers i taught myself  xp professional and the windows 8.1 which im still learning   i finally got tired of his super visor retstartd my computer and got control uninstalled skype  mozilla nightly and mozilla experimental  and several other prorams  with my revo pro uninstaller  my computer is rinning smooth now but i have seen .that ny network access protection is turned off ,how do i turn this on and is it neccasary i have malware bytes new 2.7. something full time  bought and paid for protection and windows defender .i run  a discclean every day and my mal;ware bytes and windows defender any thoughts and ideas would be appreciated i do have HP SUPPORT ASSISTANT AND MY  WARRANTY IS UP TO DATE AND PAID FOR .. sincerely donald hutchison

    dhutch1 wrote:
    i got a phone call from a unknown source today  at around  3 pm they said  that hackers where trying to access my computer . they  ran a scan  and it showed thre things one was  my network access protection was turned off . ...
    Hi,
    Now the trouble may start, you did allow people to logon to your computer and you believe them !  HP Support Assisstant is there to support your technical problems it does not know you will open the door of your house for someone to comes in to steal your money.
    Now, please change all your passwords to logon to email, bank account(s) ..... before too late. Also please download the following tool nd run on your computer, hope it can remove the nasty bits.
    Good luck.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Formcalc: access = "protected" puts protected literal in field.

    Hi. I have a form that has a field, EmpNbr, appearing twice. The two fields share the same name with Data Binding set to Use Global Data. I don't want the second field to be enterable so I set the field to protected using FormCalc, see clip below. When viewing the form in Preview PDF it is indeed protected, the cursor skips the field. However, both fields show the literal protected as the initial field value. Why is the literal protected being populated and how can I prevent it?
    If I change the access to readOnly, that becomes the initial value.
    It doesn't help if I change FC to JS.
    Below is a clip of the access command --
    topmostSubform.Page1.EmpNbr[1]::calculate - (FormCalc, client)
      $.access = "protected"
    Thanks for any insight.
    Gary

    The calculate event is "special" and is setup to return whatever the script on the event does back to the caller (in your case the field). So if you add a $.rawValue to the end of your script it will return the current value of the field and all shoudl be good. Note that if you used a different event then this woudl not happen as Calculate is the only event that operates this way.
    So your script shoudl be:
    $.access = "protected"
    $.rawValue
    Hope that helps
    Paul

  • Cannot play Adobe Access Protected Content in Chrome (version 30 and higher); Error 3321/3322?

    Symptom:
    An end-user cannot play Adobe Access protected content.  The client application returns a persistent 3321 (Individualization Error) or 3322 (Device Binding Failure) error code.
    Root Cause in Chrome Browser:
    Adobe Access DRM must create a unique machine identifier (I.e. "token") to identify the the device.  This token is provided to the Adobe Access license server during a license request to view DRM protected content.  If Chrome Browser disables the ability for Adobe Access DRM to create a unique machine identifier, playback of Protected Content will fail with a 3321 or 3322 error code.  By default, this setting is enabled and available to toggle in Chrome Browser version 30 and higher.  Unchecking this option will prevent Adobe Access DRM from properly functioning. A 3321 or 3322 error that persists after a call to resetDRMVouchers is an indicator that this setting may need to be changed.
    Resolution:
    In your Chrome settings:
    •             Click on "Show advanced settings…"
    •             In the subsequent "Privacy" section, click on "Content settings…"
    •             In the subsequent "Protected Content" section, make sure that the following box is checked "Allow identifiers for protected content (computer restart may be required)".
      We are working with Google to allow better detection of this condition, so that the client will return a 3368 (User cancelled or user settings disallow operation) error code when the box is unchecked.

    Symptom:
    An end-user cannot play Adobe Access protected content.  The client application returns a persistent 3321 (Individualization Error) or 3322 (Device Binding Failure) error code.
    Root Cause in Chrome Browser:
    Adobe Access DRM must create a unique machine identifier (I.e. "token") to identify the the device.  This token is provided to the Adobe Access license server during a license request to view DRM protected content.  If Chrome Browser disables the ability for Adobe Access DRM to create a unique machine identifier, playback of Protected Content will fail with a 3321 or 3322 error code.  By default, this setting is enabled and available to toggle in Chrome Browser version 30 and higher.  Unchecking this option will prevent Adobe Access DRM from properly functioning. A 3321 or 3322 error that persists after a call to resetDRMVouchers is an indicator that this setting may need to be changed.
    Resolution:
    In your Chrome settings:
    •             Click on "Show advanced settings…"
    •             In the subsequent "Privacy" section, click on "Content settings…"
    •             In the subsequent "Protected Content" section, make sure that the following box is checked "Allow identifiers for protected content (computer restart may be required)".
      We are working with Google to allow better detection of this condition, so that the client will return a 3368 (User cancelled or user settings disallow operation) error code when the box is unchecked.

  • Adobe Access Protection on iOS devices?

    I am having an issue in terms of Adobe Access not supported in iOS. I have been developing a custom player along with a bunch of other back end Adobe Technologies only to find out now that protection is not available in iOS.
    DRMManager.isSupported returns false when we test the app in iOS Simulator. DRMManager.isSupported returns true when we use Air Simulator.
    I am using OS X 10.9, AIR SDK 4.0, Apache Flex 4.11.0, and Xcode 5.02, and Flash Builder 4.7.
    This is a huge problem and amounts to false advertisement because the protection is supposed to be handled by Adobe AIR which is supposed to be uniform across platforms. If protection is not supported on iOS, then the appeal of write one code for multiple platforms is not there any more.
    I don't understand why protection is not uniformly supported if the same Adobe Air is installed on both iOS and Android devices. I also don't understand why HDS is supported on Android but not on iOS devices. It makes no sense. The whole reason for using Adobe AIR is to not have to deal with the specifics of each platform.
    We were supposed to go live on Jan 1st, but had to postpone to deal with several issues. Now it seems that we may have to reevaluate the decision to use Adobe technologies altogether.
    Any suggestions from Adobe would be appreciated.

    Your comments on point 3 are sobering and kind of a slap in the face to someone who has been developing a streaming app with the idea that Adobe Air has  99% reach in the desktop and mobile market. I went back to the Http Dynamic Streaming and Adobe Access pages to find the restrictions that I missed when I was deciding on the technologies to use.
    The only hint of not being able to use HDS or OSMF on iOS was the omission that Adobe Access protection could be delivered via Adobe Air on iOS devices as shown in the first image below of the Adobe Access technical specs.
    On the other hand, there all kinds of statements and illustrations that would make you believe otherwise, especially on mobile devices.
    No explicit statement can be found that says that HLS is the only way to stream content to iOS devices, that the OSMF framework is HLS agnostic, and that one has to build an iOS native app from scratch if they want to consume protected HLS. I guess not smth you want to put on a page where you want to market a product.
    In building a native app, how do I make up for the lost functionality that comes by default with AIR such as the integration of Adobe Access in AIR, DRM Management, SWF verification, etc.
    As it stands, the OSMF framework is a half-baked solution as it cannot be used on iOS devices because it is HLS agnostic….although some folks have written plugins to enable OSMF to consume HLS.
    I  am currently testing a plugin to see if I can consume protected HLS. If I fail then I will scrap the entire project…which also means not buying Adobe Access or Adobe Media Servers. Neither will I be looking at Adobe Primetime.
    My OSMF based app is able to consume HLS content when I debug in AIR Simulator. Testing on iOS simulator or iOS devices has yet to prove successful. Something breaks inside AIR when it is compiled using iOS SDK.
    The reason why I chose Adobe technologies is because it seemed like all the pieces were there to put together a streaming solution that fit my business model. I did not want to have to write everything and Adobe technologies promised a quick time to market. Now 7 months later I am finding out that perhaps I should have read the Adobe Access technical specs with the precision of a lawyer.
    In my testing, protected content cannot be consumed in AIR unless DRMManager class is available. In help.adobe.com we read the following:
    “The DRMManager manages the retrieval and storage of the vouchers needed to view DRM-protected content. With the static DRMManager.getDRMManager() method, you can access the existing DRMManager object to perform the following DRM-management tasks:
    Preload vouchers from a media rights server, using a DRMContentData object.
    Query the local cache for an individual voucher, using a DRMContentData object.
    Reset all vouchers (AIR only)
    AIR profile support: This feature is supported on all desktop operating systems and AIR for TV devices, but it is not supported on mobile devices. You can test for support at run time using the DRMManager.isSupported property.”
    Using OSMF 2.0 framework, I have been able to take advantage of both PHDS and Adobe Access protection schemes in my Flex based app running on Adobe Air on Android. In Android Devices, DRMManager .isSupported returns true.
    In iOS, it seems to be a whole different story. As I said in my first post, DRMManager.isSupported returns false when testing via iOS Simulator but returns true when testing via Air Simulator.  So the attack vector idea that you put forward cannot stand because if that was true it would require DRMManager.isSupported to be false in all debugging scenarios not just on iOS Simulator or iOS devices.
    The behavior of the app in iOS simulator and Air Simulator is not consistent when it comes to responding to touch based events and rendering visual elements as well. Performance and functionality degrades even more when testing directly on iOS devices. All iOS devices exhibit the same symptoms. For example, trying to select a list item is almost impossible….item renderers simply do not respond when one tries to select an item.
    No such symptoms or differences exist between AIR Simulator and Android devices. So, it seems to me that there are AIR to iOS compilation issues when a mobile air app is packaged through iOS SDK. Smth brakes inside of AIR during packaging. I believe that this is the reason why DRMManager.isSupported returns false when testing app in iOS simulator and devices.

  • .access = "protected"

    I read a thread that this prevents fields from being in the tabbing sequence..
    Through javascript I set some field (textfield) access to protected.. (and when alerting their access, I am getting that they are protected) but they are still receiving focus ! Is there a solution for this? I have some readonly fields that are readonly & should not be included in the tabbing sequence (like it used be in the good old days!!)
    Thanks for any help!

    Chris,
    I created three text fields in LCD 8.0. I setup the second text field to be ReadOnly and in the initialize event I placed the following:
    this.access = "protected";
    When previewed, the second text field was not editable and was skipped in the tab order.
    Rick Kuhlmann

  • Page Access Protection -Arguments Must Have checksum question

    If we want to call popup page that is defined as "Page Access Protection -Arguments Must Have checksum", then HTMLDB_UTIL.PREPARE_URL has to be called for every used URL-OK!
    <br><br>
    This calculation is easy to perform in "OnLoad-Before region" process, where some hidden varible is assigned as:
    :P_HIDDEN_VAR_URL:= HTMLDB_UTIL.PREPARE_URL('*f?p=&APP_ID.:2:&APP_SESSION.::NO::P_PROCESS:1');<br>
    and later used in call:
    javascript:popupURL('&P_HIDDEN_VAR_URL.');<br>
    AFAIK, this approach has a limitation if popup links are placed in table grid. If in grid link is defined as:
    <*a href="*javascript:popupURL('*f?p=&APP_ID.:2:&APP_SESSION.::NO:RP,2:P_PROCESS:#ID#')">#SOME_FIELD#</a><br>
    then no "HTMLDB_UTIL.PREPARE_URL" cannot be used, because every value depend on each grid row (ID field).
    <br><br>
    So is there a solution in such a cases to call popup page that have mentioned type of page access protection?
    <br>
    THX!

    See results below for call to prepare_url in SQL*Plus. It doesn't do anything, as you can see. The function can only generate a secure checksum (to be ultimately verified later within the application context) if it has some secret knowledge that is known only within the application context. So to expect it to work outside that context may be a requirement that conflicts with security aims.
    Is your requirement to use apex_mail.send from a job? Maybe you could generate the links with user-level checksums from within the application (for every possible user/argument value combination) and save them off in a table for retrieval by the mailer program. Just a thought.
    SQL> select apex_util.prepare_url('f?p=211:2:5103232296113234:x') from dual;
    APEX_UTIL.PREPARE_URL('F?P=211:2:5103232296113234:X')
    f?p=211:2:5103232296113234:x::::
    SQL> select apex_util.prepare_url('f?p=211:2:5103232296113234:x','3') from dual;
    APEX_UTIL.PREPARE_URL('F?P=211:2:5103232296113234:X','3')
    f?p=211:2:5103232296113234:x::::
    SQL> select apex_util.prepare_url('f?p=211:2:5103232296113234:x','2') from dual;
    APEX_UTIL.PREPARE_URL('F?P=211:2:5103232296113234:X','2')
    f?p=211:2:5103232296113234:x::::
    SQL> select apex_util.prepare_url('f?p=211:2:5103232296113234:x','1') from dual;
    APEX_UTIL.PREPARE_URL('F?P=211:2:5103232296113234:X','1')
    f?p=211:2:5103232296113234:x::::
    SQL>
    Scott

  • Accessing enum members from enum Class literal

    I'm using enums to provide a configuration framework. They work well, but I've hit a problem. This may be a bad use-case or just end up as a limitation of the enum support.
    In a nutshell I want to return the enum container type from a method and allow clients to access the members of that enum directly. For example:
    interface Widget
      Class<?> getColours();
    class MyWidget implements Widget
      enum COLOUR { RED, GREEN, BLUE };
      public Class<COLOUR> getColours() { return COLOUR.class;}
    // client
    MyWidget w = new MyWidget();
    w.setColour( w.getColours().BLUE ); // compile error!Of course, this gives a compile error as getColours() returned a class literal which doesn't have the field BLUE. However it seems like there should be a way to do this as all the information is there (the class literal has the necessary type information and can see the type is an enum). I've see Class#getEnumConstants() but this defeats the point by using an id or key to the enum rather than the enum member. Perhaps something like Class#asEnum():
    COLOUR b = w.getColours().asEnum().BLUE;I currently solve this by using naming conventions. Each widget implementer is required (by the framework) to provide an enum with the name 'COLOUR' that provides the colours it supports. However I'd prefer to have this on the interface to remind implementers to expose these configuration options.
    One other workaround is to create a custom container that holds a reference to each enum field ... but its not pretty:
    class MyWidget implements Widget
      public static class COLOURS
        private static COLOURS instance = new COLOURS();
        private COLOURS() {}
        public COLOUR RED = COLOR.RED;
        public COLOUR BLUE = COLOR.BLUE;   
        public COLOUR GREE = COLOR.GREEN;
        enum COLOUR { RED, GREEN, BLUE };
      public COLOURS getColours() { return COLOURS.instance;}
    // client
    MyWidget w = new MyWidget();
    w.setColour( w.getColours().BLUE ); // OKHas anyone hit this before and found a better solution? Is there something I've missed? If not does this seem like a reasonable request for improvement?

    I suspect you're better off using the static values() or valueOf(String) methods on the enum you create.
    So you could do
    Colour c = Colour.valueOf("BLUE");or even
    Color particularColour = null;
    for(Colour c : Colour.values()) {
        if (c.isApplicable(someCriteria)) {
            particularColour = c;
            break;
    }assuming you created a method isApplicable in the Colour enum. All I'm trying to suggest in this latter example is that selection of an enum value might be better delegated to the enum than performed by the caller.

  • OAM11g - How to perform direct login without accessing protected resource?

    Hi,
    I think this should be a common requirement as website needs to provide a direct login page.
    The OAM Documentation seems focus on the flow of starting from accessing protected resource then redirect to login page.
    How can we perform direct login?
    I tried from my custom login page directly, but it always gives me *"PolicyEvaluationException: OAMSSA-06191: The runtime request contains no resource"* once the login form submitted.
    Anyone can advise? Thanks in advance.

    Thanks for the reply.
    We need to cater for both the scenarios:
    Scenario 1: User tries to access a protected page. He/she will be redirected to the login page. Once it is authenticated, he/she will be redirected back to the previously requested protected page
    Scenario 2: User clicks the "Login" link on the homepage where the homepage is definitely unprotected. He/she will be redirected to the login page. Once it is authenticated, he/she will be redirected back to homepage.
    I have tried to the "Success URL" parameter of the Authentication Policy. However, once "Success URL" is defined, Scenario 1 will NOT work...
    Yes. There are some work around solution I can think about.
    Example: use a intermediate page 'rediret.jsp' which is defined as the protected resource.
    The flow is: clicks the "Login" link on the homepage -> a intermediate page 'rediret.jsp' -> login page -> redirect back to 'rediret.jsp' -> 'rediret.jsp' will redirect user to the Homepage...
    But I think Scenario 2 should be very common and it should be a right solution for it. Please advise. Thanks

  • How to access class members in jsp??

    i m working in jsp and i make a class Student having attribute name and id and i store it at tomcat\classes\Student.java
    and i store a jsp page at tomcat\webapps\root\student\index.jsp
    now i create object of class Student in jsp page it works
    but when i try to access name(Student.name) or id(Student.id)(or any class member of Student class)it shows error message
    now pls tell me how can i access class members in jsp page.

    i m working in jsp and i make a class Student having attribute name and id and i store it at tomcat\classes\mypack\Student.java
    and i store a jsp page at tomcat\webapps\root\student\index.jsp
    now i create object of class Student in jsp page it works
    but when i try to access name(Student.name) or id(Student.id)(or any class member of Student class)it shows error message
    now pls tell me how can i access class members in jsp page.
    Note: class members r public.

  • Access Protection

    Sir i was trying to check the access rights given in the complete reference. The book says that we can access the protected variables in a different package and within a subclass. But i was not able to access the protected variable from a different package though i extended the package. i was able to access the public variable. I am also attaching my code below.
    //This is the code where i am importing the package and extending the class within the package.
    import PackagePPP.*;
    public class PPP extends inpack
    public int i=10;
    protected int j=20;
    private int k=30;
    int l=40;
    public static void main(String args[])
         inpack p = new inpack();
         System.out.println("diff package diff class-->"+p.i);
         //System.out.println("diff package diff class-->"+p.j);
         //System.out.println("diff package diff class-->"+diff.k);
         //System.out.println("diff package diff class-->"+p.l);
    //This is how i have created the package.
    package PackagePPP;
    public class inpack
         public int i=10;
         protected int j=20;
         private int k=30;
         int l=40;
    }

    Hi,
    The book says that we can
    access the protected variables in a different package
    and within a subclass. That's wrong. You can access protected attributes of classes that are in the same package, or if you are subclassing.
    /Kaj

  • Network Access Protection -DHCP on Win 10 9926

    Is there a way to add the Network Access Protection DHCP components to the Win 10 Tech Preview (build9926) ?

    Hi,
    Yes, NAP support was introduced to the DHCP Server role with Windows Server 2008 and is supported in Windows client and server operating systems prior to Windows 10 Technical Preview and Windows Server Technical Preview. We can refer to the link provided
    by Paul for the reasons, if you have some advices, please feel free submit feedback to us via Windows FeedBack App.
    Thanks for your support.
    Yolanda Zhu
    TechNet Community Support

  • Accessing object members / attributes through SQL

    Hi all,
    Am I being really dumb (it's been a hard day) or am I missing something - I can't seem to access the members of an object through SQL. Is this right?
    For example :
    SQL> create type t_test as object (name varchar2(32), age number);
    2 /
    Type created.
    SQL> select me
    2 from (select t_test('Steve',31) me from dual);
    ME(NAME, AGE)
    T_TEST('Steve', 31)
    SQL> select me.name
    2 from (select t_test('Steve',31) me from dual);
    select me.name
    ERROR at line 1:
    ORA-00904: "ME"."NAME": invalid identifier
    I can access "ME" but not ME.NAME?!
    Thanks in advance,
    Steve

    You just need one more alias:
    SQL> CREATE TYPE t_test AS OBJECT
    2 (name VARCHAR2 (32),
    3      age NUMBER)
    4 /
    Type created.
    SQL> SELECT me
    2 FROM (SELECT t_test ('Steve', 31) me FROM DUAL)
    3 /
    ME(NAME, AGE)
    T_TEST('Steve', 31)
    SQL> SELECT a.me.name
    2 FROM (SELECT t_test ('Steve', 31) me FROM DUAL) a
    3 /
    ME.NA
    Steve

  • Protected members not protected?

    I thought a protected member could only be accessed by the implementing class or an extension of it. Yet I have been able to set these variables inside another class. Is their something wrong with my JVM???
    1.4.1_05
    public class ComponentModel extends ContainerModel implements IComponentModel{
        private static final long serialVersionUID = 1;   
        public static final ModelType TYPE = ModelType.getType("LogicComponentModel");
        protected transient PropertyChangeListener pcl = new LCMPropertyChangeListener();
        //transients are assigned in contructors and clone and serialization methods
        //for consistency.
        protected transient Point m_offset;
        protected transient Rectangle m_sizeRect;
    public final class WADComponentModel implements IComponentModel {
        public IBaseModel getCopy(){
            ComponentModel lcm = (ComponentModel)new ModelFactory(ComponentModel.TYPE).getNewObject();
            for(Iterator it = getChildren().iterator();it.hasNext();){
                IBaseModel model = (IBaseModel)it.next();
                model.setComponent(lcm);
                model.addPropertyChangeListener(lcm.pcl); //???
            lcm.m_offset = new Point(m_offset); //???
            lcm.m_sizeRect = new Rectangle(m_sizeRect);  //???
            return lcm;
    }why am I able to set m_offset and m_sizeRect directly like this? Why am I able to access lcm.pcl directly???
    Surely I have forgotten some simply Java principle. Or my Eclipse environment is somehow hosed.

    As an above poster mentioned, if you scroll up it is described more clearly. I will post it though.
    A member (class, interface, field, or method) of a reference (class, interface, or array) type or a constructor of a class type is accessible only if the type is accessible and the member or constructor is declared to permit access:
    If the member or constructor is declared public, then access is permitted. All members of interfaces are implicitly public.
    Otherwise, if the member or constructor is declared protected, then access is permitted only when one of the following is true:
    Access to the member or constructor occurs from within the package containing the class in which the protected member or constructor is declared.
    Access is correct as described in ?6.6.2.

Maybe you are looking for