Stack: empty() : Stack « java.util « Java by API






Stack: empty()

 
import java.util.Stack;

public class Main {
  public static void main (String args[]) {
    Stack<String> s = new Stack<String>();
    s.push("A");
    s.push("B");
    s.push("C");

    System.out.println(s.pop());
    System.out.println(s.empty());
  }
}  

   
  








Related examples in the same category

1.new Stack()
2.new Stack < E > ()
3.Stack: peek()
4.Stack: push(E item)
5.Stack: pop()
6.Stack: search(Object o)