MCPcopy Create free account
hub / github.com/apna-college/Alpha / peek

Method peek

13_Stacks/StackAL.java:23–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21 }
22
23 public int peek() {
24 if(isEmpty()) {
25 return -1;
26 }
27 return list.get(list.size()-1);
28 }
29 }
30 public static void main(String args[]) {
31 Stack stack = new Stack();

Callers 1

mainMethod · 0.95

Calls 1

isEmptyMethod · 0.95

Tested by

no test coverage detected