PrepZone Logo
PrepZone
Back to Java

Java · Medium

Difference between compile-time constants (final static) and runtime constants.

JavaTrickyCore Java

Answer preview

Compile-time constant — A static final variable initialized with a constant expression (literal). The compiler inlines the value at every usage site. Changing the value requires recompilation of all dependent classes.…