title: Return more than one variable from Java method
body: <p>Sorry for stupid question... 
  Could anybody help me with returning two variable from method (I read <a href="http://helpdesk.objects.com.au/java/how-can-i-return-more-than-one-value-from-a-java-method" rel="nofollow">here</a> 
  and tried to recode but without result).</p>
  
  <pre><code>public class FileQualityChecker {
      EnviroVars vars = new EnviroVars();  
      public int n = 0;
      public int z = 0;
      public int m = 0;
      String stringStatus;
  
  
      public void stringLenghtCheck(String pathToCheckedFile)
      {
          try{    
      FileInputStream fstream = new          FileInputStream(pathToCheckedFile+"\\"+"Test.dat");
           // Get the object of DataInputStream
           DataInputStream in = new DataInputStream(fstream);
           BufferedReader br = new BufferedReader(new InputStreamReader(in));
           String strLine;
            //Read File Line By Line
           while ((strLine = br.readLine()) != null)   
           {
  
             if  (
             strLine.length() == vars.strLenghtH ||
             strLine.length() == vars.strLenghtCUoriginal ||
             strLine.length() == vars.strLenghtCEAoriginal ||
             strLine.length() == vars.strLenghtCAoriginal ||
             strLine.length() == vars.strLenghtTrailer ||
             strLine.length() == vars.strLenghtLastRow 
  
             ) 
              {
                 stringStatus = "ok";
                 n++;
                 z++; 
  
              }
             else 
             {
                  stringStatus = "Fail";
                  n++; 
                  m++;
                  }
             System.out.println (n +" " + strLine.length() +" " + stringStatus);
            }
  
  
  
           //Close the input stream
            in.close();
          }
          catch
          (Exception e){//Catch exception if any
           System.err.println("Error: " + e.getMessage());
           }
  
           /*How to return m and z from method to use these vars for writing in the file*/
           return (m, z);
  
  
          }
  
  }
  </code></pre>
  
  <p>I need m and z in another class for write them into file. Thank you.</p>