Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/BruceEckel/OnJava8-Examples
/ push
Method
push
annotations/StackL.java:11–11 ·
view source on GitHub ↗
(T v)
Source
from the content-addressed store, hash-verified
9
public
class
StackL<T> {
10
private
LinkedList<T> list =
new
LinkedList<>();
11
public
void
push(T v) { list.addFirst(v); }
12
public
T top() {
return
list.getFirst(); }
13
public
T pop() {
return
list.removeFirst(); }
14
}
Callers
3
tPush
Method · 0.45
tPop
Method · 0.45
tTop
Method · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected