Introduction
Constants in classes hold values that do not change. They help keep important data safe and easy to use.
When you want to store a fixed value related to a class, like a version number.
When you need a value that should be the same for all objects of a class.
When you want to avoid magic numbers or strings scattered in your code.
When you want to give a name to a value that never changes, making code clearer.