For example,
How do I use this custom print method to display something in the main method?
public static void print(Stack<String> myStack ) {
int count = 1, sizeOfStack = myStack.size();
System.out.println("\nYour stack has size: " + myStack.size());
for (String myString : myStack)
{System.out.print(count + ". " + myString);
if(count!=sizeOfStack) System.out.print( " -> ");
else System.out.print( " :Last");
count++;