Results 1 to 5 of 5
  1. #1
    srikantha is offline Member
    Join Date
    Aug 2009
    Posts
    2
    Rep Power
    0

    Default why cant a top most class has staic modifier

    can any one help me
    why cant a top most class has staic modifier

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default

    Because the JLS excludes it: Classes

  3. #3
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,096
    Rep Power
    20

    Default

    What do you think a non-inner static Class would mean?

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Perhaps they are coming from the .NET world such as C# where I believe that it does have meaning. I think on this platform it makes the class a utility class where all methods and fields are static by default, but I could be wrong and corrections are most welcome.

  5. #5
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,096
    Rep Power
    20

    Default

    Quote Originally Posted by Fubarable View Post
    Perhaps they are coming from the .NET world such as C# where I believe that it does have meaning. I think on this platform it makes the class a utility class where all methods and fields are static by default, but I could be wrong and corrections are most welcome.
    And they gave that a word?

    Blimey...clearly making your constructor private was too much like hard work.

Similar Threads

  1. Replies: 24
    Last Post: 05-18-2009, 10:23 AM
  2. Replies: 7
    Last Post: 05-06-2009, 12:42 PM
  3. Replies: 8
    Last Post: 03-21-2009, 09:34 AM
  4. Regarding default access modifier?
    By makpandian in forum New To Java
    Replies: 2
    Last Post: 03-14-2009, 08:21 AM
  5. why we use public access modifier?
    By vichet in forum New To Java
    Replies: 1
    Last Post: 04-04-2008, 07:04 AM

Posting Permissions

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