Mega Code Archive

 
Categories / Java Tutorial / Collections
 

If the size of the stack is zero, true is returned; otherwise, false is returned

import java.util.Stack; public class MainClass {   public static void main (String args[]) {     Stack s = new Stack();     s.push("A");     s.push("B");     s.push("C");     System.out.println(s.pop());     System.out.println(s.empty());   } } C false