Thanks to everyone for their help.

-----Original Message-----
From: Jim Moore [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 01, 2004 1:06 PM
To: Log4J Users List
Subject: Re: Making the logger private

The "final" tells the compiler that it's guaranteed that it won't
change.  In general, that means that it's easier for the compiler
(both static and runtime) to do optimizations that it wouldn't
otherwise be able to do.  Modern JITs are good enough to notice that
it's "effectively final" and so can do much the same thing, but it's
best to be explicit and generally considered good practice for
something like this.


On Fri, 1 Oct 2004 09:47:30 -0500, McCarty, Brian
<[EMAIL PROTECTED]> wrote:
> I normally declare them private, because they are specific to each of
my
> Classes.  But what about 'final'?  I have seen it done both ways in
> examples so I am not sure what's best.
> 
> Should I use:
>         private final static Logger....
> or
>         private static Logger...
> 
> Thanks for helping with my understanding.
> 
> Brian
> 
> PS: I have a short lived "user" application and a long running app
> server application both to think about.

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


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

Reply via email to