Him: <some question> You: "Hey, that's an interesting question. Time-box an investigation into that to 20 minutes, and then we'll dig in after that if you're still not sure about the solution."
If he asks what time-boxing is, then you can have the discussion about actively investigating a solution for a specific amount of time. If, at the end of that time, you don't have a solid lead on a solution, then you reach out to your peers. That means, you have input to answer questions if your peers have any, and you know some simple solutions that don't work, and why.
That's what I've done with jr engineers for a number of years now and it works great. You have to do it a couple of times before they turn it into a habit, and internalize it, but eventually they bother you less and become better engineers in the process.
If he's asking questions out of laziness, using you as a replacement for Google, next time he asks tell him to do some investigating and that you can't always give him the easy answer. It's a key programmer skill.
1. Talk to him about it.
2. Make it more difficult for him to talk to you (put headphones on)
3. Decline working in the same space as him regularly because "I really need to concentrate today".