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 is the Lifecycle Stages of JSP ?

Why Collection Interface Doesn’t Extend Cloneable and Serializabl ...

What is the Difference Between an ArrayList and a LinkedList Data ...

What is the Difference Between wait and sleep Methods in Java ?

When Will You Use Strategy Design Pattern in Java ?