title: variable referencing in getter method
body: <p>Is the following declaration in getter method legal?</p>
  
  <p><strong>App.java</strong></p>
  
  <pre><code>package com.abc.xyz.db.main;
  
      public class App 
      {
          public static String zipfilename;
      ........................
      }
  </code></pre>
  
  <p><strong>PatchFileDetailsForIndividualFilesInPatch.java</strong></p>
  
  <pre><code>import com.abc.xyz.db.main.App;
  
  public class PatchFileDetailsForIndividualFilesInPatch {
  
      private String patchFileName;
  
      public String getPatchFileName() {
          return patchFileName;
      }
  
      public void setPatchFileName(String patchFileName) {
          this.patchFileName = App.zipfilename;
      }
  .....................
  }
  </code></pre>
  
  <p>Even though IDE is not complaining, yet I am feeling confused whether is this the correct way of passing variables declared in one class to a getter method in another class. </p>
  
  <p>I am new to Java. I know this is an extremely rudimentary question but your guidance would help me :)</p>
  
  <p>Regards</p>