title: How do I access private methods and private data members via reflection?
body: <p>I know that we can access private constructor via reflection as <a href="https://stackoverflow.com/users/193906/sanjay-t-sharma">@Sanjay T. Sharma</a> mentioned in his answer of my question: <a href="https://stackoverflow.com/questions/6636734/does-instanceof-void-always-return-false">Does “instanceof Void” always return false?</a></p>
  
  <p>However, <a href="https://stackoverflow.com/users/37213/duffymo">@duffymo</a> <a href="https://stackoverflow.com/questions/11480181/unit-testing-a-class-with-private-environment-variables/11480226#comment15160872_11480226">said</a>:</p>
  
  <blockquote>
    <p>you can access private everything with reflection - methods, constructors, data members, everything.</p>
  </blockquote>
  
  <ol>
  <li>How can I access the private methods and the private data members?</li>
  <li>Is it possible to access local variable via reflection?</li>
  <li>Is there a way to prevent anyone from accessing private constructors, methods, and data members?</li>
  </ol>