title: How I can call this function in another class?
body: <p>this is the MainActivity.Java. This function I want to call in another class</p>
  
  <p>// Method to connect to FTP server:</p>
  
  <pre><code>public static boolean ftpConnect(String host, String username,
          String password, int port) {
      try {
          mFTPClient = new FTPClient();
          mFTPClient.connect(host, port);
          if (FTPReply.isPositiveCompletion(mFTPClient.getReplyCode())) {
              boolean status = mFTPClient.login(username, password);
              mFTPClient.enterLocalPassiveMode();
              mFTPClient
                      .setFileTransferMode(org.apache.commons.net.ftp.FTP.BINARY_FILE_TYPE);
  
              return status;
          }
      } catch (Exception e) {
          Log.d(TAG, "Error: could not connect to host " + host);
      }
  
      return false;
  }
  </code></pre>