Skip to content

Instantly share code, notes, and snippets.

@AnimeshShaw
Created June 19, 2015 10:36
Show Gist options
  • Select an option

  • Save AnimeshShaw/9268cd763e80df9bd6e7 to your computer and use it in GitHub Desktop.

Select an option

Save AnimeshShaw/9268cd763e80df9bd6e7 to your computer and use it in GitHub Desktop.
package com.codehackersblog.stack;
/**
*
* @author PsychoCoder
*/
public interface StackInterface {
/**
*
* @param item Inserts an element into the stack.
*/
public abstract void push(int item);
/**
*
* @return Returns the element removed from the stack
*/
public abstract int pop();
/**'
*
* @return Returns true is the stack is empty
*/
public abstract boolean isEmpty();
/**
*
* @return Returns true if the stack is full
*/
public abstract boolean isFull();
/**
*
* @return Returns the top element of the array
*/
public abstract int peek();
/**
*
* @return Returns the size of the array
*/
public abstract int size();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment