I need to use a simple stack in my code (simple push and pop). Although a trivial situation, after some, we realized that I really do not know which class Java (Collection framework?) Is best suited for this behavior. I know that there are some classes of the framework that also have behavior in the form of a stack, as well java.util.Stack- but seeing that it expands Vectorand does not remember how this class is mentioned in any Java assembly tutorials / tutorials that I read (even for SCJP certification) I feel that this may not be the best choice, although simple online tutorials use this class.
What class should I work with?
Requirements: almost none. Just click and pop. No concurrent access. Holds Stringin the amount of 20 - several hundred (worst case).
source
share