This question is looking for your expertise and self-confidence. Normally a person who is already expert in a language will ask you this question. So you have to carefully answer this question. If you are a true expert then you can answer it by saying 9 out of 10. If you say 10 out of 10, then you may be showing off over confidence.
Another strategy to answer this question is by reducing the scope of the technology. You can say I consider myself 8 out of 10 in Core Java. I am learning Java streams. So I consider myself 6 out of 10 in Java streams. In this way you can give a rating.
But never ever give a rating below 5 for any technology. You have to be in the range of 6 to 9. Anything below 5 is a red flag. Its better to say I do not know a technology than saying 5 or 4 rating.
Sample answer is: