How do you check if a `Stack` is empty in Java?
You can check if the `size()` of the stack is equal to zero to determine if it's empty.
You're partially correct. You can check the size, but `isEmpty()` is a more direct method provided by the `Stack` class.
Can you describe the time complexity of both `isEmpty()` and `size()` methods?