static final transient int maxElements = 100; How this statement can be right? static final means constant variable & transient is not constant variable.
'transient' does not mean that the variable is not constant. It means that when you serialize the object that contains the variable, the value of the variable is not serialized.