One can only access static variables and functions in another class without creating a new instance of the helper class; One can use ClassName.variable directly, if the variable is static.
Non-static variables and functions require an instantiation to access through; ClassName cn = new ClassName(); cn.variable;
Non-static variables and functions require an instantiation to access through; ClassName cn = new ClassName(); cn.variable;
No comments:
Post a Comment