A Tiny Server
import java.net.*; import java.io.*;
public class TestServer {
static int port=2000; static BufferedReader br;
static PrintWriter pw; static ServerSocket ss;
public static void main(String [] args) {
ss = new ServerSocket(port);
br = new BufferedReader(new InputStreamReader(
(sock.getInputStream())));
pw = new PrintWriter(sock.getOutputStream());
System.out.println(br.readLine());
{System.out.println("Error connecting to port");}