To be more specific, what does "char c : s.toCharArray()" mean?
Stack stack = new Stack(); for (char c : s.toCharArray())