Newbie help on visibility and static final
I have a class where all my constants are defined,
Is there any way I can have the constants as:
private static final
and still be able to change the values from other classes?
So lets say in myconstant.java I have:
private static final int MY_CONSTANT = 5;
inside myclass.java I want to be able to access:
if(myconstant.MY_CONSTANT > 10)
and be able to change like:
myconstant.MY_CONSTANT = 10;
The problem is if I want to access outside class I have to specify protected or public.
And I have to get rid of the final keyword if I want to be able to change the constant value in other classes.