operating system
/** * Quote server listening to port 6017. * */ import java.net.*; import java.io.*; public class QuoteServer { // Your code is here public static void main(String[] args) { try { ServerSocket sock = new ServerSocket(6017); // now listen for connections while (true) { Socket client = sock.accept(); PrintWriter pout = new PrintWriter(client.getOutputStream(), true); // write the quote of the day String quote = "quote of the day"; pout.println(quote.toString()); // close the socket and resume // listening for connections client.close(); } } catch (IOException ioe) { System.err.println(ioe); } } }