Let's assume you have a stack called "s".
You can very simply print each element out using a for each loop (the iterable (as shown below), or a classic for each loop, if you prefer). This method does not modify the stack in any way.
s.forEach(System.out::println);