(int data)
| 13 | static class Stack { |
| 14 | public static Node head = null; |
| 15 | public static void push(int data) { |
| 16 | Node newNode = new Node(data); |
| 17 | |
| 18 | if(head == null) { |
| 19 | head = newNode; |
| 20 | return; |
| 21 | } |
| 22 | newNode.next = head; |
| 23 | head = newNode; |
| 24 | } |
| 25 | |
| 26 | public static boolean isEmpty() { |
| 27 | return head == null; |
no outgoing calls
no test coverage detected