3 ms·
final ... ah yes, the old final. Just remember that final is a signal to the compiler that it can perform certain optimizations on your code. This includes inl
by tezza 17y ago
final ... ah yes, the old final.
Just remember that final is a signal to the compiler that it can perform certain optimizations on your code. This includes inlining the value.
So if you use
public static final KEY="value1";
you can get inconsistent class files if you change the value, the copy classes that use KEY 'variable' across selectively.
This is most ant webapp and J2EE compiling workflows.
- gdp 17y agoThat sounds like really broken compiler or build script behaviour, rather than something intrinsically wrong with the use of final.