Advertisement
Josif_tepe

Untitled

Apr 22nd, 2021
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. import java.io.IOException;
  2. import java.net.ServerSocket;
  3. import java.net.Socket;
  4.  
  5. public class Server {
  6.     public static void main(String[] args) {
  7.         try {
  8.             System.out.println("Cekame klienti");
  9.             ServerSocket serverSocket = new ServerSocket(4567);
  10.             Socket socket = serverSocket.accept();
  11.             System.out.println("konekcijata e uspesna");
  12.         }
  13.         catch (IOException io) {
  14.             io.printStackTrace();
  15.         }
  16.     }
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement