发送端
import java.net.InetSocketAddress;
import java.net.SocketException;
public class UdpReceiveDemo01 {
public static void main(String[] args) throws Exception {
DatagramSocket socket = new DatagramSocket(8888);
//准备数据: 控制台读取 System.in
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));