Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes diff b/w static final & final static Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "diff b/w static final & final static" Watch "diff b/w static final & final static" New topic
Author

diff b/w static final & final static

suman.pulikond a
Greenhorn

Joined: Jul 31, 2005
Posts: 11
What is the actual Difference between the below two?

public static final String SEQUENCE = "sequence";

public final static String SEQUENCE = "sequence";
Mani Ram
Ranch Hand

Joined: Mar 11, 2002
Posts: 1140
Nothing.


Mani
Quaerendo Invenietis
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

Off to "Java in General (Beginner)."


[Jess in Action][AskingGoodQuestions]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
You could even write

static final public String SEQUENCE = "sequence";

as far as the compiler is concerned.

It's a good idea to have a team wide coding standard that standardizes the order of the modifiers, though. Even better to use the Sun standard...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: diff b/w static final & final static
 
Similar Threads
Passed SCJP With 80%
valid combinations of Modifiers like static,native,transient etc
subclassing
SCJP Brainteaser (6)
getProperty()