2011-02-01 8 views

答えて

1

あなたはthis

public void checkHosts(String subnet){ 
    int timeout=1000; 
    for (int i=1;i<254;i++){ 
     String host=subnet + "." + i; 
     if (InetAddress.getByName(host).isReachable(timeout)){ 
      System.out.println(host + " is reachable"); 
     } 
    } 
} 
を探しているかもしれません
関連する問題