pls can you help me to ad a main method for this class to run
thanks , it always ask me main method does not exist

Stack s = new Stack();
s.push("Fred");
s.push("John");
s.push("Andrew");
s.push("Xavier");
s.push("Mark");
s.push("Cameron");

System.out.print("Size of stack: ");
System.out.println(s.size());

System.out.print("Checking the top to get the element without
removing: ");
System.out.println(s.peek());

System.out.print("Search for Andrew: ");
System.out.println(s.search("Andrew"));

System.out.println("Printing elements using POP method: ");
while (!s.empty()) {
System.out.println(s.pop());
}

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to