Java networking tutorial

Java network programming provides the facility of connecting two or more computing devices together. The devices communicate with each other using either the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP).

The java.net package provides the classes for java network programming.

TCP protocol is used by URL, URLConnection, Socket, and ServerSocket classes whereas UDP protocol is used by DatagramPacket, DatagramSocket, and MulticastSocket classes.

Java networking tutorial