I am developing a java API (and not an API for sure) in my office that will contain 4000+ constants. Thus, all teams can use them directly. Initially, I was thinking of creating my classes according to their type and creating my static objects in a separate class. Therefore, anyone can use them directly.
But after reading the need for a static variable , I am afraid that it might be a problem to create so many static variables. Is there an alternative?
* After me, someone who joins this project can also add a constraint to my Constant class without worrying about performance. It is likely that many of the constants will be rarely used.
* Each member of the Constant class will represent a class that will have its own behavior. This may be part of some inheritance tree further. Therefore, using an enumeration may not be a very good idea.
source share