code: public void useBackupDnsServer(int index) {
          this.selectedDnsServer = backupDnsServers.get(index);
  
          try {
              this.simpleResolver = new SimpleResolver(this.selectedDnsServer);
          } catch (UnknownHostException ignore) {
          }
          this.validatingResolver = new ValidatingResolver(this.simpleResolver);
      }
docs: Use Backup DNS Server identified by index
  @param index of backup DNS server