title: How do I create a "global variable" in Java such that all classes can access it?
body: <p>here's my problem: I have multiple classes that are part of the same package and they need access to a certain file path</p>
  
  <pre><code>String filePath = "D:/Users/Mine/School/Java/CZ2002_Assignment/src/"
  </code></pre>
  
  <p>Rather than declaring the same Filepath in every single class, is it possible to simply have a "global" type of variable of this FilePath so that all classes can access it and I only need to declare and update it once.</p>
  
  <p>Thanks</p>