MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / pop

Method pop

Programs/Stack.java:52–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 }
51
52 public int pop() {
53 if(isEmpty()){
54 throw new EmptyStackException();
55 }
56 Node node = top;
57 top = top.getNextNode();
58 length--;
59 return node.getData();
60 }
61
62 public int peek(){
63 if(isEmpty()){

Callers

nothing calls this directly

Calls 3

isEmptyMethod · 0.95
getDataMethod · 0.95
getNextNodeMethod · 0.80

Tested by

no test coverage detected