Not to start another holy war, but perhaps you all could help me
either solidify or dispell something I learned ...

I've always been of the impression that mentioning a value for a
startic final member is poor form, and that this should always be done
in a static intializer, thus:

public class Foo {
  public static final String bar;

  static {
    bar = "baz";
  }
}

My understanding is that, having called "bar" static final, it will be
inlined and cause things that use Foo to have a compile dependency on
Foo.  To clarify, if you build something against Foo, and Foo changes
(bar is now equal to "fee", and not "baz"), you would have to rebuild
for your code to notice the change.  Doing things as per above, as I
understand it, keeps this from happening and removes the compile
dependency.

Have I mis-learned this?  This is one huge reason why I would never
consider an interface to implement constants :-)

Again ... no holy wars, please ;-)

-- 
Eddie Bush

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to