title: Java inner private class and variables within class
body: <p>If I have an inner class that is private, what should the access modifiers on my variables be in that class?</p>
  
  <p>Should I also make them private?</p>
  
  <p>For example:</p>
  
  <pre><code>private class MyClass {
    public String name; // what would this do?
  
  }
  </code></pre>
  
  <p>In the above example, since the class is private, but the variable <code>name</code> is public, who has access to it? </p>