Soumya Ranjan Mohanty wrote:
I thinkk you are asking that , you are not getting last output ie found = null
The reason is do-while loop , if you use while loop then you would not get the last output.
In do-while loop first token is retrieved and then printed and at last checked against null.