What is a Compile Time Constant in Java ?

A compile time constant is public static final variable. The public modifier is optional here. At compile time, they are replaced with actual values because compiler knows their value up-front and it also knows that it cannot be changed during run-time. So they are constants.



You May Interest

What are the Uses of AOP Module in Spring Framework ?

What is the Purpose of Properties File in Java ?

Why Do We Use Nested Classes in Java ?

What is the Difference Between init-param and context-param in JS ...

What are the Different Types of Classloaders in Java ?