MCPcopy Create free account
hub / github.com/Seogeurim/CS-study / pop

Method pop

contents/data-structure/code/Stack/ArrayStack.java:32–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30 }
31
32 @Override
33 public E pop() {
34 if (isEmpty()) return null;
35 E target = data[top];
36 data[top] = null; // dereference to help garbage collection
37 top--;
38 return target;
39 }
40
41 @Override
42 public E peek() {

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.95

Tested by

no test coverage detected