posted 10 years ago
Yes and no.
You can only refer to anything by
ClassName.something
… if “something” is accessible and static. It is dubious design to have accessible fields (unless they are constants), so I would recommend not to do that. I would recommend you give the field private access, and make it accessible if it is needed by using a getXXX method.