DEV Community

What is a compile time constant in Java? What is the risk of using it?

k@k on February 09, 2020

Compile time constant and Risk public static final variables are also known as a compile-time constant, the public is optional there. They are rep...
Collapse
 
hophiducanh profile image
Ho Anh

Thank you. But I'm still wondering why Java doesn't allow runtime constant?