Understanding final in Java
Compile-time initialization:
Final variables initialized at declaration:
public class Example {
final int COMPILE_TIME_CONSTANT = 10;
}
This is resolved at compile-time and the value is embedded directly in the bytecode.
Static final variable...
harishkunchala.com2 min read