阅读背景:

什么是在多个公共类之间在java中实现全局常量的最佳方法?

来源:互联网 

I've just started learning Java after getting the hang of C++, and I'm wondering if there is a way that I can have global constants the same way in C you can have a Header file with a list of constants that you can just include in any class files that need to use them. Right now, in my Java project, I am achieving this effect by using a Java interface with the constants defined as final variables.I've just started learning Java after getting t




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: