If you want that variable to be read only define it like this:
public static final int myGlobalVariable = 10;
And if you want it to be writable by other classes, then define it like this:
public static int myGlobalVariable = 10;
And if you want it to be visible by just the classes (or files) in the same package, make it protected.