title: Loop continuously between a specified range java
body: <p>I am making a Java application that will loop through my DHCP table and attempt connection to multiple devices. I am looping through an IP range, but would like to continuously loop through the range until the application is closed. 
  What would be the best practice in for continuously looping? set the value for the <code>startip</code>twice, then set the <code>startip</code> back to the original once the maximum range is reached? Below is what I currently have:</p>
  
  <pre><code>public void loopFTP(String startIP, String endIP, int timeout) throws SocketException, IOException {
      InetAddress startAsIP = InetAddresses.forString(startIP);
      InetAddress endAsIP = InetAddresses.forString(endIP);
      while(InetAddresses.coerceToInteger(startAsIP) &lt;= InetAddresses.coerceToInteger(endAsIP)){
          System.out.println(startAsIP);
          attemptConnection(startAsIP, timeout);
          startAsIP = InetAddresses.increment(startAsIP);
  
      }
  }
  </code></pre>