Results 1 to 3 of 3
  1. #1
    Jithu is offline Member
    Join Date
    Oct 2010
    Posts
    2
    Rep Power
    0

    Default Top level Protected Classes

    Hi, I am new to Java. Could anyone explain me why 'protected' classes (top-level or outer) are not allowed?

    Thanks in advance.
    Jithu

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,040
    Rep Power
    10

    Default

    What would it mean for a class to be protected?

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,778
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Jithu View Post
    Hi, I am new to Java. Could anyone explain me why 'protected' classes (top-level or outer) are not allowed?
    Think of it: what would the meaning be of a top level protected class be? Protected w.r.t what? There is no enclosing class.

    kind regards,

    Jos

Similar Threads

  1. Protected access modifier in Java
    By bluepratz in forum New To Java
    Replies: 6
    Last Post: 08-04-2010, 11:08 AM
  2. Top level and member level
    By Differintegral in forum New To Java
    Replies: 1
    Last Post: 07-30-2010, 04:50 AM
  3. protected modifier ? Constructors
    By javanew in forum New To Java
    Replies: 6
    Last Post: 04-06-2010, 12:59 PM
  4. [SOLVED] Class-level vs Object-level method()
    By mfaizan24 in forum New To Java
    Replies: 7
    Last Post: 06-23-2009, 10:18 AM
  5. help with protected method in vector class
    By katie in forum Advanced Java
    Replies: 1
    Last Post: 08-06-2007, 11:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •