?? mytimeclient.java
字號(hào):
import java.net.*;
import java.io.*;
public class MyTimeClient
{
public static void main(String[] args)
{
try{
Socket s= new Socket ("127.0.0.1",1001);
PrintStream out = new PrintStream(s.getOutputStream());
BufferedReader in = new BufferedReader(new InputStreamReader
(s.getInputStream()));
String x = in.readLine();
if(!x.equals("PASSWORD")){
System.out.println("Server is not time server");
System.exit(0);
} else {
out.println("chain");
}
x=in.readLine();
if(x.equals("WRONG")){
System.out.println("worong password");
} else {
System.out.println(x);
}
out.close();
s.close();
in.close();
}catch(IOException e){}
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -