| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/AmanKansal2012/Java-Programs/master/StackUsingArray.java | [Back] [Original] |
public class StackUsingArray {
int size = 5;
int top = -1;
int[] a = new int[size];
boolean isEmpty(){
return (top=(size-1)){
System.out.println("Stack Overflow");
}
else{
top += 1;
a[top] = x;
System.out.println(x + " pushed into stack");
}
}
int pop(){
if(top
| Web Proxy Viewer | New URL | Original Page |