ravi
answered Nov 30 '-1 00:00
one can define static and final variable at a time.
public static final int DEFAULT_SIZE = -1
above initialization DEFAULT_SIZE is public : means available to all , static : means share to all object for class , final : means its not changeable
so it is constant which shared with all object of that class.
static save memory by creating one reference for all object , and by final , no one can change even if it public
one cant change final value ,
javax.swing.GroupLayout.Alignment.LEADING = 2;
by trying to change final value of java swing GroupLayout Alignment LEADING , got error like this
cannot assign a value to final variable LEADING
incompatible types: int cannot be converted to Alignment