public CharStack()
{
//implementation
}
This constructor initializes the stack.
public void push(char element)
{
//implementation
}
This method pushes a character onto the Top of Stack.
public char pop()
{
//implementation
}
This method removes and returns the topmost element of the stack.
public char peek()
{
//implementation
}
This method returns the element at the Top of Stack, wothout removing it from the stack.
public boolean isEmpty()
{
//implementation
}
This method returns true if the stack is empty and false otherwise.the sequence.
public int size()
{
//implementation
}
This method returns the number of elements in the stack.