The java.util.Stack class (and any subclasses) will use the last-in-first-out mechanism.
thE EXAMPLE OF LINEAR DATA STRUCTURE THAT ARE UNDER LIFO FIFO:::::;;;\ LIFO:-------->>>>> STACK FIFO:-------->>>>>>> QUEUE
LIFO stands for Last In First Out. Ex: Stack
A data structure is a collection of more than one elementary item, in some kind of aggregate organization. An array is a type of structure where more than one item of the same type are arranged...
using data structure an element can insert at any position easily. with out traversing through the entire list.
it is the way the computer stores and organizes the data, to access them easily.