Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Seogeurim/CS-study
/ push
Method
push
contents/data-structure/code/Stack/ArrayStack.java:26–30 ·
view source on GitHub ↗
(E e)
Source
from the content-addressed store, hash-verified
24
}
25
26
@Override
27
public
void
push(E e) throws IllegalStateException {
28
if
(size() == data.length) throw
new
IllegalStateException(
"Stack is full"
);
29
data[++top] = e;
30
}
31
32
@Override
33
public
E pop() {
Callers
nothing calls this directly
Calls
1
size
Method · 0.95
Tested by
no test coverage detected