Results 1 to 3 of 3
  1. #1
    vknehra10 is offline Senior Member
    Join Date
    Dec 2016
    Posts
    103
    Rep Power
    0

    Default Is Static is an access modifier ?

    Is Static is an access modifier ?

    access modifier can be used in class member function or variables ....

    and we use static as a class,variables or in function too ...

    soo a lil bit confusion in my mind ..that is it or not...

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: Is Static is an access modifier ?

    Not really. Access modifiers are public, protected, private or package private (no modifier present).

    Read about them here

    Static simply means that the the field or method is shared by all classes (as opposed to an instance which
    has copies of each).

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    cronnin is offline Member
    Join Date
    Jan 2017
    Posts
    38
    Rep Power
    0

    Default Re: Is Static is an access modifier ?

    Quote Originally Posted by jim829 View Post
    Static simply means that the the field or method is shared by all classes (as opposed to an instance which has copies of each).
    Just for the sake of precision - shared by all objects instantiated from the class, that static field belongs to.

Similar Threads

  1. Access Modifier 'final'
    By Ruben in forum New To Java
    Replies: 12
    Last Post: 06-25-2012, 07:52 AM
  2. access modifier in constructor
    By javaPower in forum New To Java
    Replies: 1
    Last Post: 06-22-2010, 09:56 AM
  3. default access modifier
    By vishnugch in forum New To Java
    Replies: 1
    Last Post: 08-17-2009, 12:48 PM
  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

Tags for this Thread

Posting Permissions

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