Untitled
unknown
plain_text
a year ago
492 B
9
Indexable
import java.io.*;
import java.net.*;
public class ClientEcho {
public static void main(String q[]) throws IOException
{
Socket sc=new Socket("localhost",8001);
DataOutputStream out=new DataOutputStream(sc.getOutputStream());
String Message="hi...CSBS Student";
out.writeUTF(Message.toUpperCase()+"\n");
DataInputStream in=new DataInputStream(sc.getInputStream());
String msg=in.readUTF();
System.out.println("Message From Server: " + msg);
sc.close();
}
}Editor is loading...
Leave a Comment