He asketh them if they had any thing to eat, not because he knew not, but in order to what he intended to do to make them more attentive to the miracle which he by and by intended to work.
Related Commentaries of John 21:5
John 21:5
5 Then Jesus saith unto them,Children,a have ye any meat? They answered him, No.