I want to declare variables (array) that I can access from any class.
is there any way?
I want to declare variables (array) that I can access from any class.
is there any way?
use the public modifier, e.g.
There are some other issues you need to decide:Code:public int[] CODES;
- Is it really a variable, or is it something that must remain constant (in which case you add the final modifier).
- Does this belong to an instance of the class, or is it something that you need to be available without creating instances (in which case you make it static).
Instead of using a public variable, it may be better, depending on your requirement, to keep it private and use modifier methods.
hahahaha i got it too work!!!!!!!!!!!!!!!!!!!!! :D:D:D:D:D:D
thanks guys :)