mahoneie1552 mahoneie1552 05-03-2020 Engineering contestada StackOfStrings s = new StackOfStrings(); while (!StdIn.isEmpty()) { String item = StdIn.readString(); if (!item.equals("-")) s.push(item); else if (s.isEmpty()) StdOut.println("BAD INPUT"); else StdOut.print(s.pop() + " "); }