Current location - Training Enrollment Network - Books and materials - Java simple library management system
Java simple library management system
Let me make a direct suggestion:

The landlord first returns the number of result sets returned by this request to the client with a number, and then uses this number to control the number of loops, so that there will be no infinite loop.

I haven't written similar code, but I guess because you can get the output stream from the server every time, the while loop won't quit.