Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.IOException;
- import java.net.ServerSocket;
- import java.net.Socket;
- public class Server {
- public static void main(String[] args) {
- try {
- System.out.println("Cekam nekoj da se vkluci!");
- ServerSocket serverSocket = new ServerSocket(1234);
- Socket socket = serverSocket.accept();
- System.out.println("Konekcijata e uspesna");
- }
- catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement