Results 1 to 3 of 3

Thread: [RESOLVED] More than one modifiers at a time.

  1. #1

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Resolved [RESOLVED] More than one modifiers at a time.

    hi all,

    If I'm using more than one modifier at a time on a single statement of a Java code, can I place them in any order?

    I mean following two line are ok..

    Code:
    static final double weeks = 9.5;
    
    final static double weeks = 9.5;
    Thanks.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: More than one modifiers at a time.

    Pretty much, yes. By convention, at least, the access specifier is always first, but the order of final, static and synchronized are, in my experience, a matter of style.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Re: More than one modifiers at a time.

    I assume that there is no specific style in the industry, am I correct. It's depend on the person/programmer.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

Posting Permissions

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



Click Here to Expand Forum to Full Width