import java.net.*;
import java.io.*;
class serverport
{
public static void main(String[] args)
{
ServerSocket theServer;
for (int i=1024; i<=65535; i++)
{
try
{
theServer= new ServerSocket(i);
theServer.close();
}
catch (IOException e)
{
System.out.print("There is a server on port " +i+".");
}
}
}
}
import java.io.*;
class serverport
{
public static void main(String[] args)
{
ServerSocket theServer;
for (int i=1024; i<=65535; i++)
{
try
{
theServer= new ServerSocket(i);
theServer.close();
}
catch (IOException e)
{
System.out.print("There is a server on port " +i+".");
}
}
}
}
selamat mencoba
0 komentar:
Posting Komentar