5:30 pm - Sunday August 19, 2018

Stack Example Program for empty()

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044
/**
*@author :CandidJava.com
*@descriptions : This program explain the function and use of empty() .
*/
import java.io.*;
import java.util.*;
public class Empty
{
public static void main(String args[])
{
Stack s=new Stack();
boolean b= s.empty(); // Tests if the stack is empty
System.out.println(b);
}
}

OUTPUT:
true

BACK

Filed in: Z-A All Java Codes

Comments are closed.