What to do when the question asked has nothing to do with the exercise?

I was navigating the Java mentoring opportunities when I stumbled upon these two questions in two of the most basic exercises:

  • I would appreciate comments with regards to lists, arrays, binary trees,…
  • Is Java a solid language to learn?

The questions have nothing to do with the exercises themselves, and I was wondering if there is a best practice for this.

My approach is to answer the question asked. I then ask, “Does that answer your question?” and, “Would you like a code review, to work on improving this solution?”