My philosophy is that you ask questions either a) to ensure someone knows material they say they do (if you claim you have a bunch of Java experience, you are expected to know how java.util.collections works or how the final operator works, as examples) or b) to see how someone thinks. The questions I ask sometimes truly do not have answers, but seeing the walls pop up and the candidate try to work around the walls tells me a lot about how they will approach problems in the workplace.