Socket sock_1 = new Socket("10.1.3.15", 20003);
DataInputStream in = new DataInputStream(sock_1.getInputStream());
// System.out.println("1");
PrintStream out = new PrintStream(sock_1.getOutputStream());
//System.out.println("2");
String receive=in.readLine(); //有Woring
//System.out.println("3");
System.out.println("server: " + receive);
在编译的时候String receive=in.readLine(); 这一行会出现以下告警:“The method readLine() from the type DataInputStream is deprecated ”
后来我插入了1,2,3,每次执行到2就停住了,哪位大侠知道这是为什么吗?