Given the definition of the class 'StackArray' to implement a stack using arrays. Complete the implementation of methods- push, pop, and peek.
public class StackArray {
int[] s=new int[5];
int top=-1;
public boolean isempty( ){
return top == -1;
}
public boolean isfull( ){
return top == s.length-1;
public void push(int e) {
public int pop( ) {
public int peek( ) {
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here