what is java modifeir

Discussion in 'Java' started by gk, Sep 4, 2006.

  1. gk

    gk Guest

    i find this keyword somewhere ..."Java modifiers" ....what is it ?

    it seems , it modifies something....really ? what it modifies ?

    say i write int x=5 as a class member variable.....is there any
    modifier here ?
    gk, Sep 4, 2006
    #1
    1. Advertising

  2. =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Sep 4, 2006
    #2
    1. Advertising

  3. gk

    Stefan Ram Guest

    "gk" <> writes:
    >i find this keyword somewhere ..."Java modifiers" ....what is it ?


    I've started a home page for Java modifiers:

    http://purl.net/stefan_ram/garnoo/XOCONCEPTXSNOTATIONXSYJAVAXOSOURCEXGMODELXOSX79ZMBOLXSYMODIFIER

    From there, one can reach a page about access modifiers:

    http://purl.net/stefan_ram/garnoo/XOCONCEPTXSNOTATIONXSYJAVAXOSOURCEXGMODELXSACCESSXGMODIFIER

    But I believe that this semantic net is still incomplete,
    so there might be other types of modifiers missing in this net.
    Stefan Ram, Sep 4, 2006
    #3
  4. gk

    gk Guest

    I saw the JAVACAMP site.

    the reason i posted i am bit confused with java modifier and java
    access specifier.

    whether both are same or one is subset of other or the superset of
    other.

    access specifier is private,protected,public,defult....right ?

    does all other things apart from these above speciffiers be called
    "java modifier" ?

    see, there are so many of them like..static,final.....blah blah ...so
    these are MODIFIER ?

    MODIFIER AND ACCESS SPCIFIER AND KEYWORD .....this is bit confusing


    Stefan Ram wrote:
    > "gk" <> writes:
    > >i find this keyword somewhere ..."Java modifiers" ....what is it ?

    >
    > I've started a home page for Java modifiers:
    >
    > http://purl.net/stefan_ram/garnoo/XOCONCEPTXSNOTATIONXSYJAVAXOSOURCEXGMODELXOSX79ZMBOLXSYMODIFIER
    >
    > From there, one can reach a page about access modifiers:
    >
    > http://purl.net/stefan_ram/garnoo/XOCONCEPTXSNOTATIONXSYJAVAXOSOURCEXGMODELXSACCESSXGMODIFIER
    >
    > But I believe that this semantic net is still incomplete,
    > so there might be other types of modifiers missing in this net.
    gk, Sep 4, 2006
    #4
  5. gk

    Stefan Ram Guest

    "gk" <> writes:
    >the reason i posted i am bit confused with java modifier and
    >java access specifier. whether both are same or one is subset
    >of other or the superset of other.


    In such cases, it is best to load the Java Language Specification

    http://java.sun.com/docs/books/jls/download/langspec-3.0.pdf

    and then look up the terms in the index, which is also online at

    http://java.sun.com/docs/books/jls/third_edition/html/j3IX.html

    or do a full-text search in the PDF, if the index-approach
    does not give the answer.

    I believe that an access specified is a special case of a
    modifier.
    Stefan Ram, Sep 4, 2006
    #5
  6. gk

    gk Guest

    >I believe that an access specified is a special case of a
    >modifier.\


    OK.


    there is "KEYWORD" also ....whats that then ? how can we
    differentiate with modifier,access specifier and keyword ?







    Stefan Ram wrote:
    > "gk" <> writes:
    > >the reason i posted i am bit confused with java modifier and
    > >java access specifier. whether both are same or one is subset
    > >of other or the superset of other.

    >
    > In such cases, it is best to load the Java Language Specification
    >
    > http://java.sun.com/docs/books/jls/download/langspec-3.0.pdf
    >
    > and then look up the terms in the index, which is also online at
    >
    > http://java.sun.com/docs/books/jls/third_edition/html/j3IX.html
    >
    > or do a full-text search in the PDF, if the index-approach
    > does not give the answer.
    >
    > I believe that an access specified is a special case of a
    > modifier.
    gk, Sep 5, 2006
    #6
  7. gk

    Chris Uppal Guest

    gk wrote:

    > there is "KEYWORD" also ....whats that then ? how can we
    > differentiate with modifier,access specifier and keyword ?


    Modifiers are part of Java's semantics -- part of the /meaning/ of a Java
    program. And, as such, they are equally important no matter how you are
    handling Java. For instance if you are using reflection, you can still ask
    whether a particular method is public, or static, or synchronised, even though
    you have no access at all to the source for that class.

    Keywords are part of the /syntax/ of the Java language. There are many
    keywords, some of them are used to tell the Java compiler what modifiers to
    apply to a method (or whatever), others are used for different purposes (such
    as "for", "case", "return"). The important thing is that by the time the
    compiler has finished reading your source code, they are no longer important.
    They are gone, forgotten... You could trivially design a different language
    with a completely different set of keywords (and generally different syntax),
    where the programs /meant/ exactly the same as some Java program (and compiled
    to exactly the same bytecode, and ran identically) but where the expression as
    source code was completely, but superficially, different.

    Keywords are part of how Java is written down; modifiers (including access
    specifiiers) are part of the meaning of what you write.

    -- chris
    Chris Uppal, Sep 5, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Novice
    Replies:
    1
    Views:
    1,124
    Mike Schilling
    Jul 19, 2003
  2. Michael Kintner
    Replies:
    0
    Views:
    835
    Michael Kintner
    Nov 30, 2003
  3. Ilias Lazaridis
    Replies:
    0
    Views:
    552
    Ilias Lazaridis
    Feb 1, 2005
  4. manish sahu
    Replies:
    3
    Views:
    990
  5. Isaac
    Replies:
    0
    Views:
    354
    Isaac
    Jan 20, 2011
Loading...

Share This Page