forget406:Java Web 基础(一) 基于TCP的Socket网络编程:【这个代码把我坑到了,就一点点问题,没有编译或是运行时异常,但是就是出不来结果,插了半天也没见结果。】
https://www.cnblogs.com/forget406/p/5336748.html
String msg=null;
if((msg=br.readLine())!=null) {
System.out.println("Client:"+msg);
}
修正:
String msg=null;
if((null!=(msg=br.readLine())) {
System.out.println("Client:"+msg);
}