-
Notifications
You must be signed in to change notification settings - Fork 0
Hello, Java World!
ImSejin edited this page Mar 13, 2019
·
2 revisions
this is text.
- list 1
- list 2
quote
package practice.network;
import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
public class MainClass {
public static void main(String[] args) throws IOException {
ServerSocket ss = null;
Socket s = null;
ss = new ServerSocket(9000);
System.out.println(" -- ready to welcome client -- ");
s = ss.accept();
System.out.println(" -- success to be connected with client -- ");
System.out.println("socket: " + s);
if(s != null) s.close();
if(ss != null) ss.close();
}
}