Client  And  Server

Client

Client And Server

Server

Client And Server

两个重要的方法:

1.PrintStream类中的  public void  println(String x)

将“字符串x”+"换行符\r\n" 写入printStream流中

2.BufferedReader类中的public String readLine() 

throws  IOException

从缓冲区字符输入流中读入一行字符串,以换行符为结束字符。

返回读入的字符串(换行符不返回)

Client And Server

 

相关文章: