title: Calling newly defined method from anonymous class
body: <p>I instantiated an object of an anonymous class to which I added a new method. </p>
  
  <pre><code>Date date = new Date() {
      public void someMethod() {}
  }
  </code></pre>
  
  <p>I am wondering if it is possible to call this method from outside somehow similar to:</p>
  
  <pre><code>date.someMethod();
  </code></pre>