Skip to content
Snippets Groups Projects
Commit 16613ddb authored by Christopher Bohn's avatar Christopher Bohn :thinking:
Browse files

updated push(), updated size()

parent e9b95d53
No related branches found
No related tags found
No related merge requests found
public class MyStack {
private Object element;
public MyStack() {
super();
element = null;
}
public int size() {
return 0;
return (element == null) ? 0 : 1;
}
public void push(Object element) {
;
this.element = element;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment