title: Accessing a private String through a reference
body: <p>I need to access the message in a private String, I though it could be done easily by using a reference, however it then forces me to insert a new message that will replace the backwards one.</p>
  <pre><code>class Test {
      private String s = &quot;This is string s&quot;;
      String methodS(String a) {
          a = s;
          return s;
      }
  }
  
  class name {
      public static void main(String args[]) {
          Test elen = new Test();
          System.out.println(elen.methodS(&quot;This is string s in another class.&quot;));     
      }
  }
  </code></pre>