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 Information Hiding in Java ?

How Can We Find the Memory Usage of JVM From Java Code ?

What are the Different Types of Classloaders in Java ?

What are the Thread-safe Classes in Java Collections Framework ?

How Can You Upload a Large File in JSP ?