Guest User

Untitled

a guest
Jul 16th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import java.net.*;
  2. import java.io.*;
  3. import java.util.*;
  4.  
  5. class Two {
  6. public static void main(String args[]) throws IOException {
  7.  
  8. Socket s = new Socket("localhost",25000);
  9. Scanner sc = new Scanner(s.getInputStream());
  10. PrintWriter pw = new PrintWriter(s.getOutputStream(),true);
  11. //System.out.println(sc.nextLine());
  12. pw.println("Hello to the other side of the socket!");
  13. pw.println("Hello to the other side of the socket!");
  14. }
  15. }
Add Comment
Please, Sign In to add comment