Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #26215

Re: JLS 3/e -- Lots Of Errors

From Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand>
Newsgroups comp.lang.java.programmer
Subject Re: JLS 3/e -- Lots Of Errors
Followup-To comp.lang.java.programmer
Date 2011-02-07 15:44 +1300
Organization Geek Central
Message-ID <iinmag$9er$1@lust.ihug.co.nz> (permalink)
References <iiflvc$keg$2@lust.ihug.co.nz>

Followups directed to: comp.lang.java.programmer

Show all headers | View raw


    6.6.2.1 Access to a protected Member
    Let C be the class in which a protected member m is declared. Access is
    permitted only within the body of a subclass S of C. In addition, if Id
    denotes an instance field or instance method, then:
      • If the access is by a qualified name Q .Id , where Q is an
        ExpressionName, then the access is permitted if and only if the type
        of the expression Q is S or a subclass of S .
      • If the access is by a field access expression E .Id , where E is a
        Primary expression, or by a method invocation expression E .Id(...),
        where E is a Primary expression, then the access is permitted if and
        only if the type of E is S or a subclass of S .

What exactly is the relevance of “Id” to “m”? It seems like “Id” should be a 
protected member, but nowhere does it say this.

Back to comp.lang.java.programmer | Previous | Next | Find similar


Thread

Re: JLS 3/e -- Lots Of Errors Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-07 15:44 +1300

csiph-web