Introduction - If you have any usage issues, please Google them yourself
There are two other differences from the equivalent TCP/IP code that are worth
noting, both concerning the possible exceptions that may be generated:
• the IOException in main is replaced with a SocketException
• there is no checked exception generated by the close method in
the finally clause, so there is no try block.
Now for the code...
//Server that echoes back client s messages.
//At end of dialogue, sends message indicating number of
//messages received. Uses datagrams.