What is the primary use case of the `Stack` class in Java?
The `Stack` class is used to store elements in a sequential manner, allowing you to access the last element inserted first.
You're partially correct. The `Stack` does store elements, but it specifically follows the LIFO (Last-In-First-Out) principle.
Can you explain how the `push()` and `pop()` methods work in a `Stack`?