title: Is there a Java equivalent to Javascript's with statement?
body: <p><br />
  Is there a similar way to declare a <em>with-statement</em> in Java (as in Javascript), or are there structural reasons why this would not be possible?
  <br /><hr />
  For example, this Javascript:</p>
  
  <pre><code>with(obj)
  {
    getHomeworkAverage();
    getTestAverage();
    getAttendance();
  }
  </code></pre>
  
  <p>...is nice and easy. However, it would seem that method calls <em>have</em> to be chained to their object(s) <em>every</em> time in Java, with no such graceful shortcuts avaiable:</p>
  
  <pre><code>obj.getHomeworkAverage();
  obj.getTestAverage();
  obj.getAttendance();
  </code></pre>
  
  <p>This is very redundant, and especially irritating when there are many methods to call.
  <br /><br /><hr /></p>
  
  <ul>
  <li>So, is there any similar way to declare a <em>with-statement</em> in Java?</li>
  <li>And if this is <strong>not</strong> possible, what are the reasons that it <em>is</em> possible in Javascript as compared to <em>not</em> possible in Java?</li>
  </ul>