
Client–Server Program 11.13
14. while(( stg=bfrtobj.readLine()) != null)
15. System.out.println(“\n Message from Server” + stg);
16. //close all
17. skt.close(); bfrtobj.close();
18. }
19. }
Output: Message from Server: Welcome client
Message from Server Networking program run a great fun!
11.6.1 Client–Server: A Two-Way Communication Program
In this section, we will handle a two-way communication between a server and a client. The
server stores two arrays. In one array, RollNumbers are stored and in the second array,
academic grades are stored. The client sends the roll number and the server checks for the
grade and sends them to the client. ...