If you intend never to change a class variable, such as wScript
, you
should inform Java that no change will be made by including the keyword
final
in the variable declaration. The final
keyword
indicates that the variable is not variable at all; once that variable is
initialized, the value never changes, so such a variable is really a
constant:
*-- The variables are all constants v public static final int wScript = 6, wActing = 13, wDirection = 11;
Constants also are called final variables. Note that they must be initialized, because no value can be assigned later.