Static executables
Mohan Embar
gnustuff@thisiscool.com
Tue Jan 31 10:40:00 GMT 2006
Hi David,
>> (i.e. private static final Class c1 = gnu.java.locale.Calendar.class)
>>>> This avoids creating a new instance, which may not always
>> be possible.
>If you are compiling from classfiles (pre 1.5) the .class construct will
>not force a link (as it just does a Class.forName() or something like that).
>But for compiling from .java source you are correct.
I didn't realize this. Thanks for the clarification. It might be worth mentioning
in the Wiki that the method is never called and that the Class variable
formalism works for sourcefiles.
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/
More information about the Java
mailing list