Stos do druku Java
System.out.print(
myStack.toString().replaceAll("\\[", "").replaceAll("]", ""));
ProfCode
System.out.print(
myStack.toString().replaceAll("\\[", "").replaceAll("]", ""));
System.out.println(Arrays.toString(Mystack.toArray()));